asm3
Problem
Solution
asm3: <+0>: push ebp <+1>: mov ebp,esp <+3>: xor eax,eax <+5>: mov ah,BYTE PTR [ebp+0x9] <+8>: shl ax,0x10 <+12>: sub al,BYTE PTR [ebp+0xd] <+15>: add ah,BYTE PTR [ebp+0xe] <+18>: xor ax,WORD PTR [ebp+0x10] <+22>: nop <+23>: pop ebp <+24>: ret.intel_syntax noprefix .global asm3 asm3: push ebp mov ebp,esp xor eax,eax mov ah,BYTE PTR [ebp+0x9] shl ax,0x10 sub al,BYTE PTR [ebp+0xd] add ah,BYTE PTR [ebp+0xe] xor ax,WORD PTR [ebp+0x10] nop pop ebp ret#include <stdio.h> int asm3(int, int, int); int main(int argc, char* argv[]) { printf("0x%x\n", asm3(0xc4bd37e3,0xf516e15e,0xeea4f333)); return 0; }$ gcc -masm=intel -m32 -c test_modified.S -o test_modified.o $ gcc -m32 -c solve.c -o solve.o $ gcc -m32 test_modified.o solve.o -o solve
Flag
Last updated