这个二进制炸弹实验室在解决第4阶段时遇到了麻烦,希望能帮助您了解装配并找出解决方案。
我在阶段4求助于二进制炸弹项目的其他示例,但没有帮助。
我了解组装的基础知识,但是到目前为止在项目中已经陷入困境。
Dump of assembler code for function phase_4:
=> 0x0000000000401038 : sub $0x18,%rsp
0x000000000040103c : lea 0xc(%rsp),%rcx
0x0000000000401041 : lea 0x8(%rsp),%rdx
0x0000000000401046 : mov $0x4027bd,%esi
0x000000000040104b : mov $0x0,%eax
0x0000000000401050 : callq 0x400c10 <__isoc99_sscanf>
0x0000000000401055 : cmp $0x2,%eax
0x0000000000401058 : jne 0x401066
0x000000000040105a : mov 0xc(%rsp),%eax
0x000000000040105e : sub $0x2,%eax
0x0000000000401061 : cmp $0x2,%eax
0x0000000000401064 : jbe 0x40106b
0x0000000000401066 : callq 0x401564
0x000000000040106b : mov 0xc(%rsp),%esi
0x000000000040106f : mov $0x7,%edi
0x0000000000401074 : callq 0x401000
0x0000000000401079 : cmp 0x8(%rsp),%eax
0x000000000040107d : je 0x401084
0x000000000040107f : callq 0x401564
0x0000000000401084 : add $0x18,%rsp
0x0000000000401088 : retq
End of assembler dump.
Dump of assembler code for function func4:
0x0000000000401000 : push %r12
0x0000000000401002 : push %rbp
0x0000000000401003 : push %rbx
0x0000000000401004 : mov %edi,%ebx
0x0000000000401006 : test %edi,%edi
0x0000000000401008 : jle 0x40102e
0x000000000040100a : mov %esi,%ebp
0x000000000040100c : mov %esi,%eax
0x000000000040100e : cmp $0x1,%edi
0x0000000000401011 : je 0x401033
0x0000000000401013 : lea -0x1(%rdi),%edi
0x0000000000401016 : callq 0x401000
0x000000000040101b : lea (%rax,%rbp,1),%r12d
0x000000000040101f : lea -0x2(%rbx),%edi
0x0000000000401022 : mov %ebp,%esi
0x0000000000401024 : callq 0x401000
0x0000000000401029 : add %r12d,%eax
0x000000000040102c : jmp 0x401033
0x000000000040102e : mov $0x0,%eax
0x0000000000401033 : pop %rbx
0x0000000000401034 : pop %rbp
0x0000000000401035 : pop %r12
0x0000000000401037 : retq
End of assembler dump.