问题
I am finding difficulties in defusing phase 2. i need to get 6 numbers in order to defuse the phase 2: The assembly line for phase 2 section is as follows:
08048b54 <phase_2>:
8048b54: 53 push %ebx
8048b55: 83 ec 30 sub $0x30,%esp
8048b58: 65 a1 14 00 00 00 mov %gs:0x14,%eax
8048b5e: 89 44 24 24 mov %eax,0x24(%esp)
8048b62: 31 c0 xor %eax,%eax
8048b64: 8d 44 24 0c lea 0xc(%esp),%eax
8048b68: 50 push %eax
8048b69: ff 74 24 3c pushl 0x3c(%esp)
8048b6d: e8 d2 05 00 00 call 8049144 <read_six_numbers>
8048b72: 83 c4 10 add $0x10,%esp
8048b75: 83 7c 24 04 00 cmpl $0x0,0x4(%esp)
8048b7a: 79 05 jns 8048b81 <phase_2+0x2d>
8048b7c: e8 9e 05 00 00 call 804911f <explode_bomb>
8048b81: bb 01 00 00 00 mov $0x1,%ebx
8048b86: 89 d8 mov %ebx,%eax
8048b88: 03 04 9c add (%esp,%ebx,4),%eax
8048b8b: 39 44 9c 04 cmp %eax,0x4(%esp,%ebx,4)
8048b8f: 74 05 je 8048b96 <phase_2+0x42>
8048b91: e8 89 05 00 00 call 804911f <explode_bomb>
8048b96: 83 c3 01 add $0x1,%ebx
8048b99: 83 fb 06 cmp $0x6,%ebx
8048b9c: 75 e8 jne 8048b86 <phase_2+0x32>
8048b9e: 8b 44 24 1c mov 0x1c(%esp),%eax
8048ba2: 65 33 05 14 00 00 00 xor %gs:0x14,%eax
8048ba9: 74 05 je 8048bb0 <phase_2+0x5c>
8048bab: e8 e0 fb ff ff call 8048790 <__stack_chk_fail@plt>
8048bb0: 83 c4 28 add $0x28,%esp
8048bb3: 5b pop %ebx
8048bb4: c3 ret
For read_six_numbers function
08049144 <read_six_numbers>:
8049144: 83 ec 0c sub $0xc,%esp
8049147: 8b 44 24 14 mov 0x14(%esp),%eax
804914b: 8d 50 14 lea 0x14(%eax),%edx
804914e: 52 push %edx
804914f: 8d 50 10 lea 0x10(%eax),%edx
8049152: 52 push %edx
8049153: 8d 50 0c lea 0xc(%eax),%edx
8049156: 52 push %edx
8049157: 8d 50 08 lea 0x8(%eax),%edx
804915a: 52 push %edx
804915b: 8d 50 04 lea 0x4(%eax),%edx
804915e: 52 push %edx
804915f: 50 push %eax
8049160: 68 e3 a1 04 08 push $0x804a1e3
8049165: ff 74 24 2c pushl 0x2c(%esp)
8049169: e8 a2 f6 ff ff call 8048810 <__isoc99_sscanf@plt>
804916e: 83 c4 20 add $0x20,%esp
8049171: 83 f8 05 cmp $0x5,%eax
8049174: 7f 05 jg 804917b <read_six_numbers+0x37>
8049176: e8 a4 ff ff ff call 804911f <explode_bomb>
804917b: 83 c4 0c add $0xc,%esp
804917e: c3 ret
How can i decipher phase 2? I am a newbie to assembly language and i am interested in learning more about it. Thank you for your help.
来源:https://stackoverflow.com/questions/62217248/decipher-phase-2-stage