AA translation of asm in 64-bit

kantoboy69

kantoboy69

Expert Cheater
Table Maker
Joined
Aug 30, 2019
Messages
90
I'm not sure if this is correct translation of AA into asm

AA Script
Code:
<i>
</i>  mov     dl, byte ptr [rdi+r8+4]
  mov     dh, byte ptr [rdi+r9+4]
  mov     byte ptr [rdi+r8+4], dh
  mov     byte ptr [rdi+r9+4], dl
Memory viewer
Code:
<i>
</i>FFF90489 - 42 8A 54 07 04        - mov dl,[rdi+r8+04]
FFF9048E - 42 8A 74 0F 04        - mov sil,[rdi+r9+04]
FFF90493 - 42 88 74 07 04        - mov [rdi+r8+04],sil
FFF90498 - 42 88 54 0F 04        - mov [rdi+r9+04],dl
dh is translated as sil
but the problem is, it modified rsi value
 
SunBeam

SunBeam

Administrator
Staff member
Administrator
Joined
Feb 4, 2018
Messages
3,489
I was going to say it might be a bug, but then again it's just you trying your own way of writing code that doesn't exist:



And to respond: CE just falls back to an instruction that can be assembled, that's why:



Future suggestion: try your to-be-assembled instruction in other tools too? Thanks.

BR,
Sun
 
kantoboy69

kantoboy69

Expert Cheater
Table Maker
Joined
Aug 30, 2019
Messages
90
SunBeam said:
I was going to say it might be a bug, but then again it's just you trying your own way of writing code that doesn't exist:

And to respond: CE just falls back to an instruction that can be assembled, that's why:

Future suggestion: try your to-be-assembled instruction in other tools too? Thanks.

BR,
Sun
Thanks SunBeam.

That makes sense, considering it's 64-bit.
I should have done this instead

mov dl, byte ptr [rdi+r8+4]
xchg byte ptr [rdi+r9+4], dl
xchg byte ptr [rdi+r8+4], dl

I forgot xchg instruction exists
 
Top