From f86f7eaf1ac48edbd2cb887ce3bd137da5bfe78f Mon Sep 17 00:00:00 2001 From: Kyle Mohr <6644803+kylefmohr@users.noreply.github.com> Date: Tue, 10 Mar 2026 20:43:45 -0500 Subject: [PATCH] missed a thought --- patch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patch.py b/patch.py index d7cf35e..cc9648b 100644 --- a/patch.py +++ b/patch.py @@ -14,6 +14,7 @@ else: # However the issue is that this sequence of original_bytes shows up many many times in the executable, # so we would end up patching many places that don't need to be patched, # causing unintended functionality (likely) or else just causing the program to crash (extremely likely) +# instead, we specify *just* enough bytes such that the sequence only occurs in one place: original_bytes = b'\x48\x89\x54\x24\x10\x55\x56\x57\x48\x81\xEC\xF0\x00\x00\x00\x48\xC7\x44\x24\x78' # translated (from Ghidra (used to disassemble this program)): 15a0b00dc(*) # 14178b6c0 48 89 54 MOV qword ptr [RSP + 0x10],RDX