int __cdecl main(int argc, const char **argv, const char **envp) { int stack[32]; // [esp+1Ch] [ebp-8Ch] BYREF int v5; // [esp+9Ch] [ebp-Ch]
v5 = 0x7A69; memset(stack, 0, sizeof(stack)); puts( "Calculator.\n" "Enter a value or an operation followed by a newline.\n" "Supported operations:\n" "+: Pops two values, adds them and pushes the result\n" "-: Pops two values, subtracts the second popped with the first, pushes result\n" "m: Copies the value on top of the stack to a temporary memory\n" "w: Pushes the value from the temporary memory on top of the stack\n" "p: Prints the top of the stack\n" "n: Pops the the stack and prints the value\n" ".: Pops the stack and ignores the value\n" "q: Exits\n"); fflush(stdout); fflush(stdout); unicorns(stack); return v5; } 这就是一个LINUX下的ELF文件,用IDA直接就可以反汇编,F5直接就出伪代码了