| View previous topic :: View next topic |
| Author |
Message |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 12:38 am Post subject: Another how question [CE & C++] |
|
|
is this a pointer-to-pointer case?? because everytime i re-run the game the address which the pointer points is changing but the value is ok. how can i get the base address so that i don't have to enter pointer address and the offset just to get the value.
or atleast how can i get the address which the pointer points in C++?
"Address of Pointer: 109CD4F0 Offset: 110"
i hope you understand what i mean.
 _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Wed Apr 02, 2008 2:36 am Post subject: |
|
|
Thats the point of the pointer, to point to the address which is unknown because its changing all the time.
To get the address the pointer points to, read the value of the base address and add the offset, then you'll get the address it points to and then you can read the value from that address. thats how pointers works, value of base address+offset = address it points to. |
|
| Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 3:03 am Post subject: |
|
|
i see.
can you translate this to me in C++ code?
"address+offset = address it points to." _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Wed Apr 02, 2008 3:56 am Post subject: |
|
|
1. Read 0x109CD4F0 for a length of 4 bytes
2. Read the value returned (in your topic example: 0x2e912458)
3. Add 0x110 to the value returned - and edit that address accordingly.
You shouldn't need more information than that, yeah?
Last edited by Estx on Thu Apr 03, 2008 6:04 am; edited 1 time in total |
|
| Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 4:26 am Post subject: |
|
|
yes, that should do fine. thanks.
BTW, does anybody has a solution to this http://forum.cheatengine.org/viewtopic.php?t=219771 _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Wed Apr 02, 2008 7:34 am Post subject: |
|
|
| Estx wrote: | | 1. Read 0x109CD4F0+0x110 (which is 0x109CD600) for a length of 4 bytes |
Wrong.
The value in 0x109CD4F0+0x110, therefore you can't tell the address it will point to. (unless you read the value) |
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Wed Apr 02, 2008 8:47 am Post subject: |
|
|
| Quote: | 1. Read 0x109CD4F0+0x110 (which is 0x109CD600) for a length of 4 bytes
|
Read 0x109CD4F0 for a length of 4 bytes then add 0x110 to it. In this case it'll be 2e912348 + 110 |
|
| Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 9:19 am Post subject: |
|
|
you mean ((value of 0x109CD4F0) + 0x110) == 0x2E912348? _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Apr 02, 2008 9:38 am Post subject: |
|
|
I believe he means Value of 0x109CD4F0 is 0x2E912348... _________________
|
|
| Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 9:47 am Post subject: |
|
|
so the offset 0x110 is useless because the value of 0x109CD4F0 is 0x2e912348 which is the right address. _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Apr 02, 2008 10:11 am Post subject: |
|
|
1. Read 0x109CD4F0
2. Add the offset to what you got from it
3. Done, use your new address however you want
Example:
| Code: | int adddress = 0;
BYTE something[] = { 0x12, 0x34 };
ReadProcessMemory(someProcess, (void*)0x109CD4F0, &address, sizeof(address), NULL);
address = address + 0x110;
WriteProcessMemory(someProcess, (void*)address, &something, sizeof(something), NULL); |
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Wed Apr 02, 2008 4:51 pm Post subject: |
|
|
0x2e912348 is NOT the end address you're looking for, 0x2e912458 is.
end addresss = (value of 0x109CD4F0) + 0x110
= (0x2e912348) + 0x110
= 0x2e912458
[0x109CD4F0] is the base, when you add the offset, you get a different address in memory and, therefore, a different variable.
[0x109CD4F0] + 0x18 may be lives, and [0x109CD4F0]+0x1c may be your score or something. |
|
| Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Wed Apr 02, 2008 5:49 pm Post subject: |
|
|
thank you. i fully understand now. _________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Thu Apr 03, 2008 6:01 am Post subject: |
|
|
My mistake (before) I wasn't paying attention to what I was writing - I usually come on here before I head off to sleep lol, not a good choice because my mind is already half-way there.
What slovach said is what I intended to say. |
|
| Back to top |
|
 |
|