>> - 1, after line 8051a41: 83 f8 01 cmp $0x1,%eax
-This one jumps over only if eax is greater than 1.
The other way around ;) The jump is made if 1 is greater than eax.
>> So I'm guessing its supposed 2 or more numbers... and eax keeps track of them.
eax is the return value of the call to function 8051558.
>> -I'm not sure about this jmp instruction... I think its an unconditional jump, so that explode_bomb is there just to mess with us?
jmp is an unconditional jump indeed.
The explode_bomb is not just there to mess with you though. Do you see where this instruction jumps to ?
>> 8051a4f: 77 3c ja 8051a8d <phase_3+0x70>
>> -now, that's a jump when equal... so
>> 8051a98: 3b 5d f8 cmp 0xfffffff8(%ebp),%ebx has to be true, and ebx is given at this instruction: 8051a85: 81 eb da 03 00 00 sub $0x3da,%ebx
Sure ...
>> So... ebx is one of the numbers I need, right?
Don't jump to conclusions just yet. But you're going in the right direction.
Main Topics
Browse All Topics





by: errangPosted on 2009-04-27 at 23:07:49ID: 24247960
This is what I figured out about phase_3...
There are 3 calls to explode bomb.
- 1, after line 8051a41: 83 f8 01 cmp $0x1,%eax
-This one jumps over only if eax is greater than 1. So I'm guessing its supposed 2 or more numbers... and eax keeps track of them.
- 2, after line 8051a85: 81 eb da 03 00 00 sub $0x3da,%ebx
-I'm not sure about this jmp instruction... I think its an unconditional jump, so that explode_bomb is there just to mess with us?
- 3, after this line 8051a9b: 74 05 je 8051aa2 <phase_3+0x85>
-now, that's a jump when equal... so
8051a98: 3b 5d f8 cmp 0xfffffff8(%ebp),%ebx has to be true, and ebx is given at this instruction: 8051a85: 81 eb da 03 00 00 sub $0x3da,%ebx
So... ebx is one of the numbers I need, right? and according to... these two lines:
8051a92: 83 7d f4 05 cmpl $0x5,0xfffffff4(%ebp)
8051a96: 7f 05 jg 8051a9d <phase_3+0x80>
I would say the other number has to be greater than 5?
did I at least manage to get something right?