amyjay17
asked on
binary bomb phase 6
i've been stuck on this phase for days.... T.T someone please help me out!!!
trouble finding the correct solution...
trouble finding the correct solution...
08048d25 <phase_6>:
8048d25: 55 push %ebp
8048d26: 89 e5 mov %esp,%ebp
8048d28: 83 ec 48 sub $0x48,%esp
8048d2b: c7 45 f0 3c a6 04 08 movl $0x804a63c,0xfffffff0(%ebp)
8048d32: 8d 45 d8 lea 0xffffffd8(%ebp),%eax
8048d35: 89 44 24 04 mov %eax,0x4(%esp)
8048d39: 8b 45 08 mov 0x8(%ebp),%eax
8048d3c: 89 04 24 mov %eax,(%esp)
8048d3f: e8 70 02 00 00 call 8048fb4 <read_six_numbers>
8048d44: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
8048d4b: eb 4c jmp 8048d99 <phase_6+0x74>
8048d4d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048d50: 8b 44 85 d8 mov 0xffffffd8(%ebp,%eax,4),%eax
8048d54: 85 c0 test %eax,%eax
8048d56: 7e 0c jle 8048d64 <phase_6+0x3f>
8048d58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048d5b: 8b 44 85 d8 mov 0xffffffd8(%ebp,%eax,4),%eax
8048d5f: 83 f8 06 cmp $0x6,%eax
8048d62: 7e 05 jle 8048d69 <phase_6+0x44>
8048d64: e8 b4 08 00 00 call 804961d <explode_bomb>
8048d69: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048d6c: 83 c0 01 add $0x1,%eax
8048d6f: 89 45 fc mov %eax,0xfffffffc(%ebp)
8048d72: eb 1b jmp 8048d8f <phase_6+0x6a>
8048d74: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048d77: 8b 54 85 d8 mov 0xffffffd8(%ebp,%eax,4),%edx
8048d7b: 8b 45 fc mov 0xfffffffc(%ebp),%eax
8048d7e: 8b 44 85 d8 mov 0xffffffd8(%ebp,%eax,4),%eax
8048d82: 39 c2 cmp %eax,%edx
8048d84: 75 05 jne 8048d8b <phase_6+0x66>
8048d86: e8 92 08 00 00 call 804961d <explode_bomb>
8048d8b: 83 45 fc 01 addl $0x1,0xfffffffc(%ebp)
8048d8f: 83 7d fc 05 cmpl $0x5,0xfffffffc(%ebp)
8048d93: 7e df jle 8048d74 <phase_6+0x4f>
8048d95: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
8048d99: 83 7d f8 05 cmpl $0x5,0xfffffff8(%ebp)
8048d9d: 7e ae jle 8048d4d <phase_6+0x28>
8048d9f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
8048da6: eb 36 jmp 8048dde <phase_6+0xb9>
8048da8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
8048dab: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048dae: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp)
8048db5: eb 0d jmp 8048dc4 <phase_6+0x9f>
8048db7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048dba: 8b 40 08 mov 0x8(%eax),%eax
8048dbd: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048dc0: 83 45 fc 01 addl $0x1,0xfffffffc(%ebp)
8048dc4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048dc7: 8b 44 85 d8 mov 0xffffffd8(%ebp,%eax,4),%eax
8048dcb: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
8048dce: 7f e7 jg 8048db7 <phase_6+0x92>
8048dd0: 8b 55 f8 mov 0xfffffff8(%ebp),%edx
8048dce: 7f e7 jg 8048db7 <phase_6+0x92>
8048dd0: 8b 55 f8 mov 0xfffffff8(%ebp),%edx
8048dd3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048dd6: 89 44 95 c0 mov %eax,0xffffffc0(%ebp,%edx,4)
8048dda: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
8048dde: 83 7d f8 05 cmpl $0x5,0xfffffff8(%ebp)
8048de2: 7e c4 jle 8048da8 <phase_6+0x83>
8048de4: 8b 45 c0 mov 0xffffffc0(%ebp),%eax
8048de7: 89 45 f0 mov %eax,0xfffffff0(%ebp)
8048dea: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
8048ded: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048df0: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp)
8048df7: eb 1a jmp 8048e13 <phase_6+0xee>
8048df9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048dfc: 8b 54 85 c0 mov 0xffffffc0(%ebp,%eax,4),%edx
8048e00: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e03: 89 50 08 mov %edx,0x8(%eax)
8048e06: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e09: 8b 40 08 mov 0x8(%eax),%eax
8048e0c: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048e0f: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
8048e13: 83 7d f8 05 cmpl $0x5,0xfffffff8(%ebp)
8048e17: 7e e0 jle 8048df9 <phase_6+0xd4>
8048e19: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e1c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
8048e23: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
8048e26: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048e29: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
8048e30: eb 23 jmp 8048e55 <phase_6+0x130>
8048e32: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e35: 8b 10 mov (%eax),%edx
8048e37: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e3a: 8b 40 08 mov 0x8(%eax),%eax
8048e3d: 8b 00 mov (%eax),%eax
8048e3f: 39 c2 cmp %eax,%edx
8048e41: 7d 05 jge 8048e48 <phase_6+0x123>
8048e43: e8 d5 07 00 00 call 804961d <explode_bomb>
8048e48: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8048e4b: 8b 40 08 mov 0x8(%eax),%eax
8048e4e: 89 45 f4 mov %eax,0xfffffff4(%ebp)
8048e51: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
8048e55: 83 7d f8 04 cmpl $0x4,0xfffffff8(%ebp)
8048e59: 7e d7 jle 8048e32 <phase_6+0x10d>
8048e5b: c9 leave
8048e5c: c3 ret
Where are you stuck exactly ? How far did you get ?
ASKER
Well, i know that what the phase does is take six numbers, and then compare them by looping through what looks like three smaller conditions. The first of these three is just making sure its a number between 1-6. The second makes sure none of the numbers are repeating. The third one compares two numbers and returns true if a > b. a and b aren't the numbers from your input, so it must be calculated using some formula. I just don't know how a and b are calculated. Also, the third condition seems rarely used, but I have a feeling going through it is the only way to get through.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help. I wouldn't even have known that there was a linked list in there. So yeah, it helped a lot.