Page 1 of 1

How to compare qword size values?

Posted: Sun Sep 25, 2022 12:59 pm
by wannaknow
Let's say the base address of a game is 150000000

And I tried to use cmp in the script

cmp [rsp+10],"base address"+12345 (intending cmp [rsp+10],150012345)

But it didn't work and I found in opcode that it worked as cmp [rsp+10],50012345.

1,which was the most front, has been cut.

I put qword ptr and (qword) in front of operands but it said not possible.

I guess this is because cmp only work within 32bit size.

Any ideas for comparing 64bit size operands?

Thanks in advance

Re: How to compare qword size values?

Posted: Sun Sep 25, 2022 1:30 pm
by iNvIcTUs oRCuS
You have to compare it through registers...
Example...
mov rax, 150012345
cmp [rsp+10], rax

Re: How to compare qword size values?

Posted: Wed Sep 28, 2022 5:13 am
by wannaknow
iNvIcTUs oRCuS wrote:
Sun Sep 25, 2022 1:30 pm
You have to compare it through registers...
Example...
mov rax, 150012345
cmp [rsp+10], rax
Thanks for help.