4.1 Disassembly Challenge

Let's take on another simple challenge. The following is a disassembled output of a simple C program. Can you figure out what this program does, and can you translate it back to a pseudocode?

mov dword ptr [ebp-4], 16hmov dword ptr [ebp-8], 5mov eax, [ebp-4]add eax, [ebp-8]mov [ebp-0Ch], eaxmov ecx, [ebp-4]sub ecx, [ebp-8]mov [ebp-10h], ecx

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.