装配炸弹实验室阶段_4

时间:2016-02-18 01:01:10

标签: assembly reverse-engineering x86-64

  0x00000000004010e4 <+0>:     sub    $0x18,%rsp          rsp=-24
   0x00000000004010e8 <+4>:     lea    0x8(%rsp),%rcx   rcx=76
   0x00000000004010ed <+9>:     lea    0xc(%rsp),%rdx   rdx=0
   0x00000000004010f2 <+14>:    mov    $0x40298d,%esi   esi= 37 input is %d %d
   0x00000000004010f7 <+19>:    mov    $0x0,%eax                eax=0
   0x00000000004010fc <+24>:    callq  0x400cb0 <__isoc99_sscanf@plt>  
   0x0000000000401101 <+29>:    cmp    $0x2,%eax                eax=2
   0x0000000000401104 <+32>:    jne    0x401112 <phase_4+46> if eax not = to 2 
   0x0000000000401106 <+34>:    mov    0x8(%rsp),%eax          eax=2
   0x000000000040110a <+38>:    sub    $0x2,%eax               eax=0
   0x000000000040110d <+41>:    cmp    $0x2,%eax
   0x0000000000401110 <+44>:    jbe    0x401117 <phase_4+51>   if eax below = 2
   0x0000000000401112 <+46>:    callq  0x40166c <explode_bomb>
   0x0000000000401117 <+51>:    mov    0x8(%rsp),%esi          esi=2
   0x000000000040111b <+55>:    mov    $0x8,%edi               edi=8
   0x0000000000401120 <+60>:    callq  0x4010ac <func4>
   0x0000000000401125 <+65>:    cmp    0xc(%rsp),%eax
   0x0000000000401129 <+69>:    je     0x401130 <phase_4+76> 
   0x000000000040112b <+71>:    callq  0x40166c <explode_bomb>
   0x0000000000401130 <+76>:    add    $0x18,%rsp
   0x0000000000401134 <+80>:    ret

__________________________________________________
function 4 
   0x00000000004010ac <+0>:     push   %r12                     r12 == 49
   0x00000000004010ae <+2>:     push   %rbp                     rbp==0
   0x00000000004010af <+3>:     push   %rbx                       rbx== -25
   0x00000000004010b0 <+4>:     mov    %edi,%ebx              ebx ==8
   0x00000000004010b2 <+6>:     test   %edi,%edi                  8==8
   0x00000000004010b4 <+8>:     jle    0x4010da <func4+46> if edi <= edi
   0x00000000004010b6 <+10>:    mov    %esi,%ebp               ebp=2
   0x00000000004010b8 <+12>:    mov    %esi,%eax                eax=2
   0x00000000004010ba <+14>:    cmp    $0x1,%edi 
   0x00000000004010bd <+17>:    je     0x4010df <func4+51>
   0x00000000004010bf <+19>:    lea    -0x1(%rdi),%edi            edi=7
   0x00000000004010c2 <+22>:    callq  0x4010ac <func4>
   0x00000000004010c7 <+27>:    lea    (%rax,%rbp,1),%r12d     r12d=68
   0x00000000004010cb <+31>:    lea    -0x2(%rbx),%edi             edi=6
   0x00000000004010ce <+34>:    mov    %ebp,%esi                    esi=2
   0x00000000004010d0 <+36>:    callq  0x4010ac <func4>
   0x00000000004010d5 <+41>:    add    %r12d,%eax                 eax=40 
   0x00000000004010d8 <+44>:    jmp    0x4010df <func4+51>
   0x00000000004010da <+46>:    mov    $0x0,%eax  
   0x00000000004010df <+51>:    pop    %rbx   
   0x00000000004010e0 <+52>:    pop    %rbp
   0x00000000004010e1 <+53>:    pop    %r12
---Type <return> to continue, or q <return> to quit---
   0x00000000004010e3 <+55>:    retq

以上是我的装配线代码。在每一行的一侧,我已经找出了每一行的价值并注释了我的笔记。我很难找到符合0x0000000000401125 <+65>:行的答案。请帮助我!我花了好几个小时试图解决这个问题。任何帮助表示赞赏。

0 个答案:

没有答案