我正在尝试找出在二元炸弹实验室第 3 阶段拆除炸弹的正确输入。我发现输入必须是两个整数,并且第一个整数必须小于 7。我一直在使用任意第一个值 (1) 来尝试使用跳转表来计算第二个值,但我似乎无法得到答案。具体来说,我一直在这条线之后引爆炸弹0x0000000000400ffc <+165>: cmp 0x8(%rsp),%eax
。
任何帮助或指导将不胜感激。
函数phase_3的汇编代码转储:
0x0000000000400f57 <+0>: sub $0x18,%rsp
0x0000000000400f5b <+4>: lea 0x8(%rsp),%rcx
0x0000000000400f60 <+9>: lea 0xc(%rsp),%rdx
0x0000000000400f65 <+14>: mov $0x4027ed,%esi
0x0000000000400f6a <+19>: mov $0x0,%eax
0x0000000000400f6f <+24>: callq 0x400c30 <__isoc99_sscanf@plt>
0x0000000000400f74 <+29>: cmp $0x1,%eax
0x0000000000400f77 <+32>: jg 0x400f7e <phase_3+39>
0x0000000000400f79 <+34>: callq 0x401574 <explode_bomb>
0x0000000000400f7e <+39>: cmpl $0x7,0xc(%rsp)
0x0000000000400f83 <+44>: ja 0x400feb <phase_3+148>
0x0000000000400f85 <+46>: mov 0xc(%rsp),%eax
0x0000000000400f89 <+50>: jmpq *0x402520(,%rax,8)
0x0000000000400f90 <+57>: mov $0x0,%eax
0x0000000000400f95 <+62>: jmp 0x400f9c <phase_3+69>
0x0000000000400f97 <+64>: mov $0x3a0,%eax
0x0000000000400f9c <+69>: sub $0x3c2,%eax
0x0000000000400fa1 <+74>: jmp 0x400fa8 <phase_3+81>
0x0000000000400fa3 <+76>: mov $0x0,%eax
0x0000000000400fa8 <+81>: add $0x23d,%eax
0x0000000000400fad <+86>: jmp 0x400fb4 <phase_3+93>
0x0000000000400faf <+88>: mov $0x0,%eax
0x0000000000400fb4 <+93>: sub $0x3e6,%eax
0x0000000000400fb9 <+98>: jmp 0x400fc0 <phase_3+105>
0x0000000000400fbb <+100>: mov $0x0,%eax
0x0000000000400fc0 <+105>: add $0x3e6,%eax
0x0000000000400fc5 <+110>: jmp 0x400fcc <phase_3+117>
0x0000000000400fc7 <+112>: mov $0x0,%eax
0x0000000000400fcc <+117>: sub $0x3e6,%eax
0x0000000000400fd1 <+122>: jmp 0x400fd8 <phase_3+129>
0x0000000000400fd3 <+124>: mov $0x0,%eax
0x0000000000400fd8 <+129>: add $0x3e6,%eax
0x0000000000400fdd <+134>: jmp 0x400fe4 <phase_3+141>
0x0000000000400fdf <+136>: mov $0x0,%eax
0x0000000000400fe4 <+141>: sub $0x3e6,%eax
0x0000000000400fe9 <+146>: jmp 0x400ff5 <phase_3+158>
0x0000000000400feb <+148>: callq 0x401574 <explode_bomb>
0x0000000000400ff0 <+153>: mov $0x0,%eax
0x0000000000400ff5 <+158>: cmpl $0x5,0xc(%rsp)
0x0000000000400ffa <+163>: jg 0x401002 <phase_3+171>
=> 0x0000000000400ffc <+165>: cmp 0x8(%rsp),%eax
0x0000000000401000 <+169>: je 0x401007 <phase_3+176>
0x0000000000401002 <+171>: callq 0x401574 <explode_bomb>
0x0000000000401007 <+176>: add $0x18,%rsp
0x000000000040100b <+180>: retq