Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Tutorial Step 6

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials
View previous topic :: View next topic  
Author Message
cholo
Cheater
Reputation: 0

Joined: 18 Oct 2010
Posts: 33

PostPosted: Thu Dec 23, 2010 11:24 am    Post subject: Tutorial Step 6 Reply with quote

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
View user's profile Send private message
Geri
Moderator
Reputation: 110

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Thu Dec 23, 2010 2:37 pm    Post subject: Reply with quote

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.

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
cholo
Cheater
Reputation: 0

Joined: 18 Oct 2010
Posts: 33

PostPosted: Thu Dec 23, 2010 2:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Geri
Moderator
Reputation: 110

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Thu Dec 23, 2010 3:14 pm    Post subject: Reply with quote

Well, 0000004C is surely not a base address for some in-game item, that's for sure. Smile
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.

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites