您能指正我阅读此汇编代码吗? 这来自二进制炸弹实验室。 第29行将输入与2进行比较,它必须相等,所以我知道2是答案的一部分。 第38行从eax减去2,所以我知道第二个输入2 <= 0 func4:我认为它是X * 12,但是比较是rsp + 0xc等于2则失败了
请您帮忙
0x00000000004010e8 <+0>: sub rsp,0x18
0x00000000004010ec <+4>: lea rcx,[rsp+0x8]
0x00000000004010f1 <+9>: lea rdx,[rsp+0xc]
0x00000000004010f6 <+14>: mov esi,0x402a2d
0x00000000004010fb <+19>: mov eax,0x0
0x0000000000401100 <+24>: call 0x400cb0 <__isoc99_sscanf@plt>
0x0000000000401105 <+29>: cmp eax,0x2
0x0000000000401108 <+32>: jne 0x401116 <phase_4+46>
0x000000000040110a <+34>: mov eax,DWORD PTR [rsp+0x8]
0x000000000040110e <+38>: sub eax,0x2
0x0000000000401111 <+41>: cmp eax,0x2
0x0000000000401114 <+44>: jbe 0x40111b <phase_4+51>
0x0000000000401116 <+46>: call 0x40167d <explode_bomb>
0x000000000040111b <+51>: mov esi,DWORD PTR [rsp+0x8]
0x000000000040111f <+55>: mov edi,0x5
0x0000000000401124 <+60>: call 0x4010b0 <func4>
0x0000000000401129 <+65>: cmp eax,DWORD PTR [rsp+0xc]
0x000000000040112d <+69>: je 0x401134 <phase_4+76>
0x000000000040112f <+71>: call 0x40167d <explode_bomb>
0x0000000000401134 <+76>: add rsp,0x18
0x0000000000401138 <+80>: ret
func4:
0x00000000004010b0 <+0>: push r12
0x00000000004010b2 <+2>: push rbp
0x00000000004010b3 <+3>: push rbx
0x00000000004010b4 <+4>: mov ebx,edi
0x00000000004010b6 <+6>: test edi,edi
0x00000000004010b8 <+8>: jle 0x4010de <func4+46>
0x00000000004010ba <+10>: mov ebp,esi
0x00000000004010bc <+12>: mov eax,esi
0x00000000004010be <+14>: cmp edi,0x1
0x00000000004010c1 <+17>: je 0x4010e3 <func4+51>
0x00000000004010c3 <+19>: lea edi,[rdi-0x1]
0x00000000004010c6 <+22>: call 0x4010b0 <func4>
0x00000000004010cb <+27>: lea r12d,[rax+rbp*1]
0x00000000004010cf <+31>: lea edi,[rbx-0x2]
0x00000000004010d2 <+34>: mov esi,ebp
0x00000000004010d4 <+36>: call 0x4010b0 <func4>
0x00000000004010d9 <+41>: add eax,r12d
0x00000000004010dc <+44>: jmp 0x4010e3 <func4+51>
0x00000000004010de <+46>: mov eax,0x0
0x00000000004010e3 <+51>: pop rbx
0x00000000004010e4 <+52>: pop rbp
0x00000000004010e5 <+53>: pop r12
0x00000000004010e7 <+55>: ret