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 


Confused by mov ecx, [ecx+14]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
calciumantacid
How do I cheat?
Reputation: 0

Joined: 28 Dec 2011
Posts: 5

PostPosted: Wed Sep 18, 2013 1:00 pm    Post subject: Confused by mov ecx, [ecx+14] Reply with quote

So, I was happily tracing a pointer and adding addresses with offsets. Then I get to 16CE7F68 with offset 20, search for the address that points to it - it's 16CE3AAC. Check what accesses it and get this:

0262E673 - 8B 49 14 - mov ecx,[ecx+14]
02D71BE7 - 8B 76 14 - mov esi,[esi+14]
02D7268F - 8B 76 14 - mov esi,[esi +14]

The value of the pointer to find this address is probably 16CE7F68.

It says the pointer address is 16CE7F68 which is what I was tracing from, it already had an offset of 20. Now I'm back to it for some reason, with apparently offset 14. But if I try to add that to the pointer, I can see it's not correct.

What to do? It's probably something very simple?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25805
Location: The netherlands

PostPosted: Wed Sep 18, 2013 1:21 pm    Post subject: Reply with quote

The value of the registers shown is that after the instruction has been executed
Anyhow, you can do basic math to figure out the original value

ecx+14=the address you used find what accesses on ( 16CE3AAC)

So ecx=16ce3aac+14=16ce3a98
So, scan for 16ce3a98

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
calciumantacid
How do I cheat?
Reputation: 0

Joined: 28 Dec 2011
Posts: 5

PostPosted: Wed Sep 18, 2013 8:36 pm    Post subject: Reply with quote

Thank you very much, Dark Byte!

So if I understood correctly - it seems that in the typical scenarios like mov edi,[esi+14] we basically have mov pointer1,[pointer2+14] and we can scan the next address directly by looking for pointer2 value.

But if we have mov ecx,[ecx+14] that means mov pointer1,[pointer1+14] and we must calculate pointer2 manually, so pointer2 = current address - 14.

Then we scan for the new address by pointer2 value and when we create a manual pointer entry, we will enter that new address + 14.

My brain hurts, lol. I had to make a spreadsheet to visualize what's happening.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25805
Location: The netherlands

PostPosted: Thu Sep 19, 2013 4:07 am    Post subject: Reply with quote

The only reason you look at the assembler code is to figure out the offset, to find out where the current memory block starts at. Which is what you're looking for
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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