fix for pensil

This commit is contained in:
Akash Mozumdar 2019-07-20 16:51:00 -04:00
parent 68e915192f
commit 79cd50ade7

View File

@ -8211,6 +8211,8 @@ bool InsertPensilHook()
for (DWORD i = processStartAddress; i < processStopAddress - 4; i++)
if (*(DWORD *)i == 0x6381) // cmp *,8163
if (DWORD j = SafeFindEntryAligned(i, 0x100)) {
// Artikash 7/20/2019: I don't understand how or why this is possible, but I found a game that by default has copy on write memory for its .text section
VirtualProtect((void*)j, 1, PAGE_EXECUTE_READ, DUMMY);
HookParam hp = {};
hp.address = j;
hp.offset = 8;