Skip to content

Commit

Permalink
fix for pensil
Browse files Browse the repository at this point in the history
  • Loading branch information
Artikash committed Jul 20, 2019
1 parent 68e9151 commit 79cd50a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions texthook/engine/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79cd50a

Please sign in to comment.