I recently started a new c++ win32 console Project. It basically rewrites the value of a given Address in Memory.
The point is, I want it to use a pointer-map with offsets to recalculate the address it should use. Here is an image of the pointer map in Cheat Engine.
As I said, I managed it to rewrite the value (1147 in this case) manually if I just type the address, but I want it to be automatic! Hope you understand my problem
have a nice day.
To get the base address of a module(DLL or EXE) in memory you can enumerate the loaded modules using ToolHelp32Snapshot Windows API function. Microsoft provides documented source code to find the module. Basically you need 2 functions, one to grab the ProcessId and then one to get the base address.
Then you do:
If you've injected into the process in an internal hack you can use GetModuleHandle because as of posting the handle returned is just the address of the module:
To calculate the dynamic address pointed to by a multi-level pointer you can use this function, it basically de-references the pointer externally for you using ReadProcessMemory():