BruceM How do I cheat?
Reputation: 0
Joined: 05 Aug 2013 Posts: 2
|
Posted: Mon Aug 05, 2013 8:59 am Post subject: C++ WritingProcessMemory with mutli level pointers? |
|
|
I have some code below that would write over a memory location of a pointer+offset,
Would anyone be able to push me in the right direction of a multi level pointer?
The pointer proceeds in this manner:
0396A39C+118 = 0396A4B4
[0396AE18+24] -> 0396A39C
[0396A39C+5B0 -> 00396AE18
[0396EA60+3E0] -> 0396A39C
[0489101C+140] -> 0396EA60
"THREADSTACK0"-00000318 -> 0489101C
Also using the pointer scanner on CE the last offset of the pointer is:
" "THREADSTACK0"-00000318 -> 0489101C "
I'm not quite sure how I would incorporate this as well?
| Code: |
DWORD Pointer = 0x0396A39C;
DWORD Pointed;
WORD Offset = 0x0118
int CurrentCash = 0;
int newValue = 0;
ReadProcessMemory(hProc,(LPCVOID)(Pointer), &Pointed, 4, NULL);
ReadProcessMemory(hProc,(LPCVOID)(Pointed+Offset), &CurrentCash, 4, NULL);
WriteProcessMemory(hProc,(LPCVOID)(Pointed+Offset), &newValue, (DWORD)sizeof(newValue), NULL);
|
Any help/suggestions is appreciated.
Thanks,
|
|