| View previous topic :: View next topic |
| Author |
Message |
three0s How do I cheat?
Reputation: 0
Joined: 21 Aug 2015 Posts: 3
|
Posted: Mon Sep 07, 2015 10:44 pm Post subject: How do you access "somegame.exe"+offset ? |
|
|
I was following some basic tutorial on how to write a trainer in C++. And I found my base pointer through pointer scanning.
I got "somegame.exe"+offset as my starting point (followed by few other offsets which I know how they work). Now my question is what is this offset? And how do I access this location in C++? Say I have the handle to the exe, what should be the next step?
Thanks in advance!
Edit:
I think I found how to solve it, would still appreciate if someone can give a detailed solution (or explaination). Thanks.
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Tue Sep 08, 2015 2:24 am Post subject: |
|
|
CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.
The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.
That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.
Hope this helps
_________________
|
|
| Back to top |
|
 |
three0s How do I cheat?
Reputation: 0
Joined: 21 Aug 2015 Posts: 3
|
Posted: Tue Sep 08, 2015 6:25 am Post subject: |
|
|
| STN wrote: | CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.
The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.
That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.
Hope this helps  |
Tyvm !
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Tue Sep 08, 2015 6:47 am Post subject: |
|
|
No problem, glad to be of help
_________________
|
|
| Back to top |
|
 |
lolofdoom How do I cheat?
Reputation: 0
Joined: 30 Dec 2013 Posts: 5 Location: idk
|
|
| Back to top |
|
 |
hey How do I cheat?
Reputation: 0
Joined: 04 Nov 2015 Posts: 4
|
Posted: Wed Nov 04, 2015 12:12 pm Post subject: |
|
|
| STN wrote: | CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.
The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.
That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.
Hope this helps  |
How to find base address from my own .exe (c++) application, not by injection dll? I found really nice code here but I cannot get GetModuleBase to work (forum.cheatengine.org/viewtopic.php?t=584686)
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
|