Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // IPL: inst per file
- void IPLsectionLimits::SetInstLimitPerFile(int iInstPerFile)
- {
- //CPatch::EnableDebugMode();
- if (CPatch::IsDebugModeActive())
- iInstPerFile = 4096;
- else if (iInstPerFile > 4096)
- IPLentriesOfFile = new void*[iInstPerFile];
- IPLentriesPerFileLimit = iInstPerFile;
- // Patch addresses
- CPatch::PatchPointer(0x5B51F0 + 3, IPLentriesOfFile); // mov eax, ds:__iplInst[edx*4]
- CPatch::PatchPointer(0x5B51FF + 3, IPLentriesOfFile); // mov ecx, ds:__iplInst[ecx*4]
- CPatch::PatchPointer(0x5B524B + 1, IPLentriesOfFile); // push offset __iplInst
- CPatch::PatchPointer(0x5B5258 + 3, IPLentriesOfFile); // mov esi, ds:__iplInst[ebx*4]
- CPatch::PatchPointer(0x5B531C + 1, IPLentriesOfFile); // push offset __iplInst
- CPatch::PatchPointer(0x5B5340 + 3, IPLentriesOfFile); // mov edx, ds:__iplInst[esi*4]
- CPatch::PatchPointer(0x5B8938 + 3, IPLentriesOfFile); // mov ds:__iplInst[ecx*4], eax
- CPatch::PatchPointer(0x5B8A50 + 1, IPLentriesOfFile); // mov ecx, offset __iplInst
- CPatch::PatchPointer(0x5B8A50 + 1, IPLentriesOfFile); // mov ecx, offset __iplInst
- CPatch::PatchPointer(0x5B8A6F + 3, IPLentriesOfFile); // lea eax, __iplInst[edx*4]
- CPatch::DisableDebugMode();
- CGenericLogStorage::SaveFormattedTextLn("Modified limit of IPL: inst per file to: %d", iInstPerFile);
- CGenericLogStorage::WriteLineSeparator();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement