Answer the question
In order to leave comments, you need to log in
ASM, x86, Explain the line with the CMP command?
Hello! Let me tell you right now, I am new to these things. I was digging with the help of a disassembler in the program, and then I came across a line: cmp d,[ebp][-4],0FFFFE0BE
Please explain what it all means: where did d come from? because cmp just compares two numbers? Why is the last argument (by all logic - it should be int32) of 33 bytes: 0 + 32 bytes of number?
Background: just above this line, the function takes a local variable (ebp-4, let's call it v) and subtracts 10000 from it. Most of the v before subtraction has values of ~1998. Those. 1998 - 10000 = -8002. But in the comparison command above - v is compared with FFFFE0BE .... if you invert this number, you get exactly 1F42(8002). I'm assuming this has something to do with UNSIGNED?
Answer the question
In order to leave comments, you need to log in
UPD. I played around with the calculator ... it turns out that FFFFE0BE is -8002 ... then everything converges:
v -= 10000;
if(v <= -8002)
// code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question