| View previous topic :: View next topic |
| Author |
Message |
Csimbi I post too much
Reputation: 98
Joined: 14 Jul 2007 Posts: 3344
|
Posted: Sat Jun 11, 2022 10:52 am Post subject: Incorrect assembly in CMP (non-issue, solved) |
|
|
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 |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25859 Location: The netherlands
|
Posted: Sat Jun 11, 2022 3:43 pm Post subject: |
|
|
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 |
|
 |
Csimbi I post too much
Reputation: 98
Joined: 14 Jul 2007 Posts: 3344
|
Posted: Sat Jun 11, 2022 4:04 pm Post subject: |
|
|
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 |
|
 |
|