Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Applies FXT loader
- void ApplyFXTloader()
- {
- uintptr_t pReplayOutOfMemory = (uintptr_t)g_mScanner.FindString("REPLAY_OUT_OF_MEMORY");
- uintptr_t pCallToGetText = (uintptr_t)g_mScanner.FindWithFunction(
- [](tMemoryScanControl& control, void* pCustomData)
- {
- uintptr_t pReplayOutOfMemory = (uintptr_t)pCustomData;
- const unsigned __int8* ptr = control.ptr;
- if (ptr[0] == 0x48 && ptr[1] == 0x8D && ptr[2] == 0x15
- && ptr[7] == 0x48 && ptr[8] == 0x8D
- && ptr[14] == 0xE8
- )
- {
- uintptr_t RDX_target = (uintptr_t)ptr + 7 + *(DWORD*)(ptr + 3);
- return RDX_target == pReplayOutOfMemory;
- }
- return false;
- },
- 7 + 7 + 5,
- (void*)pReplayOutOfMemory
- );
- pCallToGetText += 15; // call argument.
- uintptr_t pGetText = *(DWORD*)pCallToGetText + pCallToGetText + 4;
- MH_CreateHook((void*)pGetText, &DetourCText__GetText, &fpCText__GetText);
- MH_EnableHook((void*)pGetText);
- // printf_MessageBox("replay: 0x%llX", pGetText);
- /////////////////////////////
- CLimitAdjusterForGame* pLimitAdjusterForGame = (CLimitAdjusterForGame*)pLimitAdjuster;
- pLimitAdjusterForGame->m_FXTloader.SetMaxKeyLength(8);
- pLimitAdjusterForGame->m_FXTloader.LoadFXTfiles("FXT");
- CGenericLogStorage::SaveTextLn("FXT loader is enabled.");
- CGenericLogStorage::WriteLineSeparator();
- // pLimitAdjuster->TerminateProcess();
- // FXTloader::LoadFXTfiles("GTA5_FXT");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement