scorni How do I cheat?
Reputation: 0
Joined: 18 Nov 2015 Posts: 4
|
Posted: Wed Nov 18, 2015 12:38 pm Post subject: Read Cheatengines Threadstack0 with c++ |
|
|
I want to get the address that you get if you add an manual address in cheatengine and type "Threadstack0" as the value. In this example i used the Tutorial-i386.exe wich returns for example 0x165FF8C as Threadstack0.
As first step i am opening the thread in c++ with
| Code: | | OpenThread(THREAD_ALL_ACCESS, 0, thread_id ); |
and obtain thread thread context with
| Code: | ctx.ContextFlags = CONTEXT_ALL;
SuspendThread(thandle);
GetThreadContext(thandle, &ctx);
ResumeThread(thandle); |
The next step is to get the base address with virtualquery
| Code: | _MEMORY_BASIC_INFORMATION buffer;
VirtualQueryEx(phandle, (void*)(ctx.Esp), &buffer, sizeof(buffer)); |
If i return the address
| Code: | | ShowMessage(IntToHex((int)buffer.BaseAddress ,8)); |
It is showing me an adress like 0x0165F000, but i want to get the address 0x165FF8C which is displayed by Cheatengine.
Someone any ideas? |
|