Posted: Thu Jul 16, 2020 6:12 pm Post subject: Need help with a CMP
I'm pretty new to assembly so this may be very obvious but I don't understand what a CMP does without a JMP of some kind
Code:
sub rsp,20
cmp [rcx+54],edx //<----- I don't understand the meaning of this CMP
mov rdi,r8
mov esi,[rcx+00000088]
mov rbx,rcx
cmovb edx,[rcx+54]
cmp edx,esi
je ShadowOfWar.exe+EE9E31
mov [rcx+00000088],edx
mov rdx,r8
cmp sets the rflags register, mov instructions don't access rflags, cmovb reads rflags to see if it should move a value.
e.g. "if [rcx+54] is below edx, move [rcx+54] into edx"; it's effectively a constraint on the maximum value of edx. _________________
I don't know where I'm going, but I'll figure it out when I get there.
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