二进制炸弹 第六棵
最近在玩二进制炸弹
刚初步翻译了一汇编 是 二进制炸弹 实验里滴第六个炸弹
翻译了半天 累哦
大家来检查下俺有那里翻译滴不对吗?
刚初步翻译了一汇编 是 二进制炸弹 实验里滴第六个炸弹
翻译了半天 累哦
大家来检查下俺有那里翻译滴不对吗?
00401409 <_phase_6>:
401409: 55 push %ebp
40140a: 89 e5 mov %esp,%ebp
40140c: 83 ec 08 sub $0x8,%esp
40140f: 8b 45 08 mov 0x8(%ebp),%eax
401412: 89 04 24 mov %eax,(%esp)
401415: e8 56 08 00 00 call 401c70 <_atoi>
40141a: a3 ac 34 40 00 mov %eax,0x4034ac
40141f: c7 04 24 ac 34 40 00 movl $0x4034ac,(%esp)
401426: e8 8e ff ff ff call 4013b9 <_fun6>
40142b: ba 01 00 00 00 mov $0x1,%edx
401430: 8b 40 08 mov 0x8(%eax),%eax
401433: 42 inc %edx
401434: 83 fa 05 cmp $0x5,%edx
401437: 7e f7 jle 401430 <_phase_6+0x27>
401439: 8b 00 mov (%eax),%eax
40143b: 3b 05 ac 34 40 00 cmp 0x4034ac,%eax
401441: 74 05 je 401448 <_phase_6+0x3f>
401443: e8 8a 06 00 00 call 401ad2 <_explode_bomb>
401448: c9 leave
401449: c3 ret
翻译过来滴结构貌似应该这样:
typedef struct LIST_T
{
int a;
int b;
struct LIST_T* next;
}List;
004013b9 <_fun6>:
4013b9: 55 push %ebp
4013ba: 89 e5 mov %esp,%ebp
4013bc: 56 push %esi
4013bd: 53 push %ebx
4013be: 8b 75 08 mov 0x8(%ebp),%esi //parameter liste head listeSi
4013c1: 8b 5e 08 mov 0x8(%esi),%ebx //(listeSi.a is input value) List* listeBx = listeSi.next
4013c4: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) //listeSi.next = null
4013cb: 85 db test %ebx,%ebx //if( NULL == listeBx ) goto finish
4013cd: 74 34 je 401403 <_fun6+0x4a>
4013cf: 89 f2 mov %esi,%edx //List* listeDx = listeSi; (l5)
4013d1: 89 f1 mov %esi,%ecx //List* listeCx = ListeSi;
4013d3: 85 f6 test %esi,%esi //if( NULL == listeSi ) goto l1
4013d5: 74 15 je 4013ec <_fun6+0x33>
4013d7: 8b 06 mov (%esi),%eax //listeSi.a
4013d9: 3b 03 cmp (%ebx),%eax //if(listeSi.a <= listeBx.a ) goto l1
4013db: 7e 0f jle 4013ec <_fun6+0x33>
4013dd: 89 d1 mov %edx,%ecx //listeCx = listeDx; (l2)
4013df: 8b 52 08 mov 0x8(%edx),%edx //listeDx = listeDx.next
4013e2: 85 d2 test %edx,%edx //if(NULL == listeDx) goto l1
4013e4: 74 06 je 4013ec <_fun6+0x33>
4013e6: 8b 02 mov (%edx),%eax //if( listeDx.a > listeBx.a ) goto l2
4013e8: 3b 03 cmp (%ebx),%eax
4013ea: 7f f1 jg 4013dd <_fun6+0x24>
4013ec: 39 d1 cmp %edx,%ecx //if (listeCx > listeDx) goto l3 (l1)
4013ee: 74 05 je 4013f5 <_fun6+0x3c>
4013f0: 89 59 08 mov %ebx,0x8(%ecx) //listeCx.next = listeBx;
4013f3: eb 02 jmp 4013f7 <_fun6+0x3e> //goto l4
4013f5: 89 de mov %ebx,%esi //listeSi = listeBx; (l3)
4013f7: 8b 4b 08 mov 0x8(%ebx),%ecx //listeCx = listeBx.next; (l4)
4013fa: 89 53 08 mov %edx,0x8(%ebx) //listeBx.next = listeDx;
4013fd: 89 cb mov %ecx,%ebx //listeBx = listeCx;
4013ff: 85 c9 test %ecx,%ecx //if(NULL != listeCx) goto l5
401401: 75 cc jne 4013cf <_fun6+0x16>
401403: 89 f0 mov %esi,%eax //(finish)
401405: 5b pop %ebx
401406: 5e pop %esi
401407: 5d pop %ebp
401408: c3 ret
...全文
相关推荐
二进制炸弹
CASPP的实验LAB3,二进制炸弹实验。详细分析了6个炸弹与隐藏函数。并讲解了解答过程。
二进制炸弹完整解决过程+源代码
二进制炸弹完整解决过程+源代码
CSAPP Lab2 bomblab二进制炸弹
CSAPP Lab2 bomblab二进制炸弹 拆炸弹实验源代码 深入理解计算机系统课程实验二资料。程序设计与计算机系统课程。
gdb调试解二进制炸弹
二进制炸弹简单教程及示例。 简述二进制炸弹的构造原理,以及如何在linux环境下使用gdb调试拆弹。
二进制炸弹代码及gdb调试工具
这是二进制炸弹博客的文章所需内容,里面包括bomb.exe,可直接打开运行,并且带有GDB工具和objdump工具,还有它们的文档。 改成0积分下载


