|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
cholo Cheater Reputation: 0
Joined: 18 Oct 2010 Posts: 33
|
Posted: Thu Dec 23, 2010 11:24 am Post subject: Tutorial Step 6 |
|
|
If [EAX*2+EDX+00000310], where EAX=4C and EDX=00801234, means EDX has the value the pointer has, and EAX*2+00000310 is the offset (2*4C+00000310=3A8), then how do you find the offset in this case:
[EAX+EDX*2+00000310]
How do you define which is the value of the pointer, and what is the offset?
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Thu Dec 23, 2010 2:37 pm Post subject: |
|
|
These codes are typically accessing to more values in a list.
EDX is the base address of the structure and EAX is a counter which is defining the number of the item in the list.
As for the pointer, You have done the math.
EDX+3A8.
_________________
|
|
Back to top |
|
|
cholo Cheater Reputation: 0
Joined: 18 Oct 2010 Posts: 33
|
Posted: Thu Dec 23, 2010 2:57 pm Post subject: |
|
|
How do you know EDX is the base address, and EAX is a counter?
It seems logical that you don't multiply an address, so is that it?
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Thu Dec 23, 2010 3:14 pm Post subject: |
|
|
Well, 0000004C is surely not a base address for some in-game item, that's for sure.
And yes, multiplying an address is not a good idea, which makes it more obvious that EAX is the counter and EDX is the base address.
And the concept is simple, let's say You want to read values from a list, but obviously, You don't use 200 codes with 200 offsets to read 200 item from the list.
Making 200 codes like
mov eax,[EDX+04]
mov eax,[EDX+08]
mov eax,[EDX+0C]
would be seriously stupid.
Instead, there is one code only, like
mov eax,[EDX+ECX*4]
In this case, ECX is the number of the item and it is multiplied by 4 because the address is stored on 4 bytes. This way, this code can read any value from the list just by changing ECX to the correct value.
For example if You want the 3rd item, on offset 0C, then change ECX to 3.
mov eax,[EDX+3*4]
Simple enough, and logical too if You think about it.
_________________
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|