C Boilerplate Decompilation

push rbp // push the main function to stack
mov rbp,rsp // sets up new stack frame for main function
sub rsp,0x10 // Allocate 16 bytes of stack space for local variables
mov DWORD PTR [rbp-0x4],edi // stores first argument 'argc' onto stack
mov QWORD pTR [rbp-0x10],rsi // stores second argument `argv` onto stack
mov %fs:0x28,%rax // stack smashing prevention
 
...
 
mov    eax,0x0 // return 0;
leave // pops old frame pointer off stack
ret // returns to main's initial address

Opcodes

operationIntel Syntaxpseudo demo
mov (move)mov ebx, 123ebx = 123
Mov eax, ebxeax = ebx
addadd ebx, ecxebx += ecx
subsub ebx, edxebx -= edx
mul (multiply)mul ebxeax = ebx
divdiv edxeax /= edx
int (interrupt)Int 0Check if program ended
int 0x80System call. Check if eax and abx register have cool values
jmp (jump)jmp some_addrChanges RIP to the address
nop(no operation)nopDo nothing
cmon (conditional move)cmov ecx, eaxif ecx has the value true, then move address stored in eax