9.3.7 Comparing Values in Memory (cmpsx)

The cmpsb instruction is used to compare a byte in the memory address specified by esi with a byte in the memory address specified by edi, to determine if they contain the same data. The cmpsb is normally used with repe (repe cmpsb) to compare two memory buffers; in this case, ecx will be set to the buffer length, and the comparison will continue until ecx=0 or the buffers are not equal.

Get Learning Malware Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.