Advertisement
AbsoluteGamer

Pointer Function

Jun 18th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Windows.h>
  2.  
  3. DWORD ReadPointer(HANDLE hProcess, PVOID Base, DWORD Offsets[], DWORD Level)
  4. {
  5.     DWORD TempAddr;
  6.     if (!ReadProcessMemory(hProcess, Base, &TempAddr, 4, NULL)) return 0;
  7.     for (int i = 0; i < Level - 1; i++)
  8.     {
  9.         TempAddr += Offsets[i];
  10.         if (!ReadProcessMemory(hProcess, (PVOID)TempAddr, &TempAddr, 4, NULL)) return 0;
  11.     }
  12.     return TempAddr + Offsets[Level - 1];
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement