diff --git a/PolygonClientUtilities/Patches.cpp b/PolygonClientUtilities/Patches.cpp index f6eeca6..e2fb50c 100644 --- a/PolygonClientUtilities/Patches.cpp +++ b/PolygonClientUtilities/Patches.cpp @@ -13,48 +13,4 @@ LONG Patches::Apply() DetourAttach(&(PVOID&)*patch.first, patch.second); return DetourTransactionCommit(); -} - -VOID Patches::ResolveOffset() -{ - // the only surviving fragment of PolygonUtil.dll - // RIP 05/08/2021 - 20/01/2022 - - MEMORY_BASIC_INFORMATION mbi; - DWORD ProcID = GetCurrentProcessId(); - HANDLE Handle = OpenProcess(PROCESS_ALL_ACCESS, TRUE, ProcID); - - unsigned int Opcode = 0xC7F18B56; - int BaseAddress = 0x00001000; - - int Offset = 0x00010000; - int Searches = 0xFFF; - - for (int i = 1; i <= Searches; i++) - { - int SearchAddress = Offset * i; - int Address = SearchAddress + BaseAddress; - if (VirtualQuery((LPVOID)Address, &mbi, sizeof(mbi)) == 0) continue; - - std::vector buffer(mbi.RegionSize); - - if (!ReadProcessMemory(Handle, (LPCVOID)Address, &buffer[0], buffer.size(), NULL)) continue; - - if (buffer[0] == Opcode) - { - addressOffset = SearchAddress; - break; - } - - if (SearchAddress == Offset * Searches) - { - ExitProcess(EXIT_FAILURE); - } - } -} - -INT Patches::GetAddressByOffset(int address) -{ - if (!addressOffset) ResolveOffset(); - return address + addressOffset; } \ No newline at end of file diff --git a/PolygonClientUtilities/Patches.h b/PolygonClientUtilities/Patches.h index 2792cd2..45f7bb3 100644 --- a/PolygonClientUtilities/Patches.h +++ b/PolygonClientUtilities/Patches.h @@ -7,8 +7,6 @@ namespace Patches extern std::vector patchList; LONG Apply(); - VOID ResolveOffset(); - INT GetAddressByOffset(int address); } #define START_PATCH_LIST() std::vector Patches::patchList = {