计算机系统_炸弹(boom)实验/逆向工程实验(phase_2)

在解释之前先附上一段代码:

0000000000400e8c <phase_2>:
  400e8c:	48 89 5c 24 e0       	mov    %rbx,-0x20(%rsp)
  400e91:	48 89 6c 24 e8       	mov    %rbp,-0x18(%rsp)
  400e96:	4c 89 64 24 f0       	mov    %r12,-0x10(%rsp)
  400e9b:	4c 89 6c 24 f8       	mov    %r13,-0x8(%rsp)
  400ea0:	48 83 ec 48          	sub    $0x48,%rsp
  400ea4:	48 89 e6             	mov    %rsp,%rsi
  400ea7:	e8 97 08 00 00       	callq  401743 <read_six_numbers>    
  400eac:	48 89 e5             	mov    %rsp,%rbp
  400eaf:	4c 8d 6c 24 0c       	lea    0xc(%rsp),%r13               
  400eb4:	41 bc 00 00 00 00    	mov    $0x0,%r12d                    
  400eba:	48 89 eb             	mov    %rbp,%rbx
  400ebd:	8b 45 0c             	mov    0xc(%rbp),%eax  
  400ec0:	39 45 00             	cmp    %eax,0x0(%rbp)               
  400ec3:	74 05                	je     400eca <phase_2+0x3e>
  400ec5:	e8 73 07 00 00       	callq  40163d <explode_bomb>  
  40
  • 4
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
分析以下这段代码:void renwumove() { //炸弹人1 static int num = 0; if ((GetAsyncKeyState(0x57) & 0x8000))//w { if (num < control) num++; else if (num == control) { if (y_man>30) { order++; turn = 1; if (map[(x_man + distence / 2) / 10][y_man / 10] != 2 && map[(x_man + distence / 2) / 10][y_man / 10] != 22) { y_man = y_man - speed; } Sleep(1); if (order == 3) order = 0; } num = 0; } } if ((GetAsyncKeyState(0x53) & 0x8000))//s { if (num < control) num++; else if (num == control) { if (y_man + distence < high - 30) { order++; turn = 0; if (map[(x_man + distence / 2) / 10][(y_man + distence) / 10] != 2 && map[(x_man + distence / 2) / 10][(y_man + distence) / 10] != 22) { y_man = y_man + speed; } Sleep(1); if (order == 3) order = 0; } num = 0; } } if ((GetAsyncKeyState(0x41) & 0x8000))//a { if (num < control) num++; else if (num == control) { if (x_man>30) { order++; turn = 2; if (map[x_man / 10][(y_man + distence / 2) / 10] != 22 && map[x_man / 10][(y_man + distence / 2) / 10] != 2) { x_man = x_man - speed; } Sleep(1); if (order == 3) order = 0; } num = 0; } } if ((GetAsyncKeyState(0x44) & 0x8000))//d { if (num < control) num++; else if (num == control) { if (x_man + distence <width-30) { order++; turn = 5; if (map[(x_man + distence) / 10][(y_man + distence / 2) / 10] != 22 && map[(x_man + distence) / 10][(y_man + distence / 2) / 10] != 2) { x_man = x_man + speed; } Sleep(1); if (order == 3) order = 0; } num = 0; } } if ((GetAsyncKeyState(VK_SPACE))) { if (whether == 0) { begin = clock(); x_boom = x_man; y_boom = y_man; map[x_boom / 10+1][y_boom / 10+1] = 3; whether++; } } }
07-14

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值