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 


Incorrect assembly in CMP (non-issue, solved)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3344

PostPosted: Sat Jun 11, 2022 10:52 am    Post subject: Incorrect assembly in CMP (non-issue, solved) Reply with quote

Hi all,
I am observing a strange behaviour and I am not sure why this is happening.

This the AA code:
Code:
cmp dword ptr [bEnableInfiniteDoubleJumps],1
jne short lblDoubleJumpTogglerSkip


CE assembles it as:
Code:
15DF682000B - 48 83 3D EDFFFFFF 01  - cmp qword ptr [bEnableInfiniteDoubleJumps],01
15DF6820013 - 75 0C                 - jne 15DF6820021


Any ideas under what circumstances does that DWORD become QWORD?

The crazy part is, I am using the same script template as before, there should not be anything special; the other scripts are fine.

cmp byte ptr ... is assembled correctly.

Thank you!


Last edited by Csimbi on Sat Jun 11, 2022 4:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Jun 11, 2022 3:43 pm    Post subject: Reply with quote

Are you sure that the cmp instruction starts at 15DF682000B and not at 15DF682000C ? and that the 48 isn't part of the previous instruction ?
_________________
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
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3344

PostPosted: Sat Jun 11, 2022 4:04 pm    Post subject: Reply with quote

I think so:
Code:
//Alt: mov byte ptr [rsi+0000011C],00     ; C6 86 1C010000 00
//db C6 86 1C 01 00 00 00
readmem(aobDoubleJumpToggler,8)
cmp dword ptr [bEnableInfiniteDoubleJumps],1
jne short lblDoubleJumpTogglerSkip


Code:
29D53ED0004 - C6 86 1C010000 00     - mov byte ptr [rsi+0000011C],00
29D53ED000B - 48 83 3D EDFFFFFF 00  - cmp qword ptr [bEnableInfiniteDoubleJumps],01
29D53ED0013 - 75 00                 - jne 29D53ED0015


Meh, I read an extra byte there with readmem!!!
lol

Not sure why the disassembly looked okay for the byte prt variant..

Thanks!

I updated the topic's title.
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 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