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 


ASM code strange behaviour

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
CodeKiller
Advanced Cheater
Reputation: 0

Joined: 30 Jun 2009
Posts: 87

PostPosted: Tue Jan 01, 2013 12:01 am    Post subject: ASM code strange behaviour Reply with quote

Hello all,

Here a piece of code :

Code:
newmem5:
push ecx
mov ecx, eax
add ecx, DC
mov [hull], ecx
pop ecx

originalcode5:
mov eax,[eax+000000DC]
jmp returnhere5


The strange thing is, when I use the hull address in the table the pointer is 0x100 lower than it should -compared to the eax+DC address ).
If the real address should be 012345 in the table it will be : 012245...
I have 4 times the same code (only the offset is changing) and for the 3 others it works fine.

I know I can just add myself the 100 offset or directly use the value and not the pointer but I want to make this thing clear.

Thanks !!!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Tue Jan 01, 2013 4:17 am    Post subject: Reply with quote

You're using the sign extended version of add and dc is a negative value. (-36)
use
Code:

add ecx, 000000dc

instead

_________________
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 -> General Gamehacking 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