| View previous topic :: View next topic |
| Author |
Message |
zarut How do I cheat?
Reputation: 0
Joined: 29 Jul 2006 Posts: 5
|
Posted: Tue Apr 15, 2008 8:12 am Post subject: C++ Using pointers address |
|
|
| How can i use pointer address in c++ the address looks like this LieroX.exe+00041008 since the address of my z,x,y changes everytime i close game i had to use pointer to find real one always so if its possible use this in c++ and how could it be done?
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Apr 15, 2008 8:28 am Post subject: |
|
|
| Module Base Address+X.
|
|
| Back to top |
|
 |
zarut How do I cheat?
Reputation: 0
Joined: 29 Jul 2006 Posts: 5
|
Posted: Tue Apr 15, 2008 9:01 am Post subject: |
|
|
hmm what is exactly module base address and that + x?
example would be nice too
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Apr 15, 2008 9:48 am Post subject: |
|
|
He gave you the 'math' for code shifting type things.
Base + Offset = Address
Address - Base = Offset
Every module that is loaded into a programs memory space has a base address of where it starts. You need this base address to calculate the offset to use next time the program is loaded.
You can obtain the base address of a module using the following API:
- CreateToolhelp32Snapshot
- Process32First / Process32Next
- Module32First / Module32Next
Google 'em for examples, as they are used very commonly now-a-days.
_________________
- Retired. |
|
| Back to top |
|
 |
zarut How do I cheat?
Reputation: 0
Joined: 29 Jul 2006 Posts: 5
|
Posted: Tue Apr 15, 2008 2:38 pm Post subject: |
|
|
| So far i think i found the base address that is 00400000 and other address is 01EA4BA0 so how do i start subract these? im not sure about those letters so no idea how i get offset out from those two address
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Apr 15, 2008 3:10 pm Post subject: |
|
|
| 01EA4BA0 is probably not in the main module, (base address 0x400000) try finding a static pointer.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Apr 16, 2008 10:39 am Post subject: |
|
|
| zarut wrote: | | So far i think i found the base address that is 00400000 and other address is 01EA4BA0 so how do i start subract these? im not sure about those letters so no idea how i get offset out from those two address |
As Symbol said, thats probably not the correct base address. 00400000 is commonly the base address given to a program. (VB6 defaults to this memory address.)
While you have CE attached to the program, open the memory editor and goto the menu:
View -> Enumerate DLL's and Symbols
As you said your address was located at 01EA4BA0, look for a module that is close (but less then) that address. Something like 01E00000.
_________________
- Retired. |
|
| Back to top |
|
 |
|