diff --git a/src/dbg/memory.cpp b/src/dbg/memory.cpp index 6dfe200c..80348f55 100644 --- a/src/dbg/memory.cpp +++ b/src/dbg/memory.cpp @@ -607,4 +607,33 @@ bool MemFindInMap(const std::vector & pages, const std::vectorhProcess, /* ProcessCookie */36, &cookie, sizeof(ULONG), nullptr) < 0) + return false; + + // XOR pointer with key + *Pointer = (duint)((ULONG_PTR)(*Pointer) ^ cookie); + return true; } \ No newline at end of file diff --git a/src/dbg/memory.h b/src/dbg/memory.h index 1f5e8658..6fddbf0c 100644 --- a/src/dbg/memory.h +++ b/src/dbg/memory.h @@ -37,4 +37,5 @@ bool MemGetPageRights(duint Address, char* Rights); bool MemPageRightsToString(DWORD Protect, char* Rights); bool MemPageRightsFromString(DWORD* Protect, const char* Rights); bool MemFindInPage(SimplePage page, duint startoffset, const std::vector & pattern, std::vector & results, duint maxresults); -bool MemFindInMap(const std::vector & pages, const std::vector & pattern, std::vector & results, duint maxresults, bool progress = true); \ No newline at end of file +bool MemFindInMap(const std::vector & pages, const std::vector & pattern, std::vector & results, duint maxresults, bool progress = true); +bool MemDecodePointer(duint* Pointer); \ No newline at end of file