From 303140dfbff810ffcde0129bd04858025d5151f6 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 9 Nov 2018 05:15:45 -0500 Subject: [PATCH] update cmvs hook --- vnrhook/engine/engine.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vnrhook/engine/engine.cc b/vnrhook/engine/engine.cc index 444dd57..1d5c036 100644 --- a/vnrhook/engine/engine.cc +++ b/vnrhook/engine/engine.cc @@ -4266,6 +4266,8 @@ bool InsertCMVS2Hook() enum { addr_offset = 3 }; // offset from the beginning of the function ULONG range = min(processStopAddress - processStartAddress, MAX_REL_ADDR); ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStartAddress + range); + // Artikash 11/9/2018: Not sure, but isn't findCallerAddress a better way to do this? + if (!addr) addr = MemDbg::findCallerAddressAfterInt3((DWORD)GetGlyphOutlineA, processStartAddress, processStopAddress); if (!addr) { ConsoleOutput("vnreng:CMVS2: pattern not found"); return false;