Binary Bomb Lab - Phase 3: (x86 Assembly)
I am getting lost when stepping through the code using gdb. Could someone translate the assembly and explain what the code is doing in simple terms, please?
0000000000400fba
400fba: 400fbb 400fbe: 400fc2: 400fc6: 400fca: 400fcf: 400fd4: 400fd9: 400fdc: 400fde: 400fe3: 400fe7: 400Fe9: 400fec: ff 24 c5 00 27 40 00 400ff3: 400ff8: 400ffa: 400fff: 401004: 401006: 40100b: 401010: 401012: 401017: 40101c: 40101e: 401023: 401028: 40102a: 40102f: 401034: 401036: 40103b: 401040: 401042: 401047: 40104c: 40104e: 401053: 401058: 40105b: 40105d: 401062: 401063: 48 83 ec 10 48 8d 4d fc 48 8d 55 8 be cd 29 40 00 b8 00 00 00 00 e8 97 fc ff ff sub lea lea mov mov calla $0x10,%rsp -0x4(%rbp),%rcx -0x8(%rbp),%rdx $0x4029cd,%esi $0x0,%eax 400c70 jg 400fe3 callq 40166e cmpl $0x7,-0x8(%rbp) ja 40104e mov -0x8(%rbp),%eax jmpq mov $0x365,%eax jmp 400fff mov $0x0,%eax sub $0x3b2,%eax jmp 40100b mov 0x0,%eax add $0x2c1,%eax jmp 401017 mov $0x0,%eax sub $0x3b4,%eax jmp 481023 mov $0x0,%eax add $0x28c,%eax jmp 40102f mov $0x0, %eax sub $x33b,%eax jmp 40183b mov $0x0,%eax add $0x323,%eax jmp 401047 mov $0x0,%eax sub $0x343,%eax jmp 401058 callq 40166e mov $0x0,%eax p -0x4(%rbp),%eax je 401962 callq 40166e leaveq e8 8b 06 00 00 83 7d f8 07 *0x402700(,%rax, 8) b8 65 03 00 00 b8 00 00 00 00 2d b2 03 00 00 b8 00 00 00 00 05 c1 02 00 00 b8 00 00 00 00 2d b4 03 00 00 b8 00 00 00 00 05 8c 02 00 00 b8 00 00 00 00 2d 3b 03 00 00 b8 00 00 00 00 05 23 03 00 00 b8 00 00 00 00 2d 43 03 00 00 e8 1b 06 00 00 b8 00 00 00 00 e8 8c 86 00 00 C3 0000000000400fba 400fba: 400fbb 400fbe: 400fc2: 400fc6: 400fca: 400fcf: 400fd4: 400fd9: 400fdc: 400fde: 400fe3: 400fe7: 400Fe9: 400fec: ff 24 c5 00 27 40 00 400ff3: 400ff8: 400ffa: 400fff: 401004: 401006: 40100b: 401010: 401012: 401017: 40101c: 40101e: 401023: 401028: 40102a: 40102f: 401034: 401036: 40103b: 401040: 401042: 401047: 40104c: 40104e: 401053: 401058: 40105b: 40105d: 401062: 401063: 48 83 ec 10 48 8d 4d fc 48 8d 55 8 be cd 29 40 00 b8 00 00 00 00 e8 97 fc ff ff sub lea lea mov mov calla $0x10,%rsp -0x4(%rbp),%rcx -0x8(%rbp),%rdx $0x4029cd,%esi $0x0,%eax 400c70 jg 400fe3 callq 40166e cmpl $0x7,-0x8(%rbp) ja 40104e mov -0x8(%rbp),%eax jmpq mov $0x365,%eax jmp 400fff mov $0x0,%eax sub $0x3b2,%eax jmp 40100b mov 0x0,%eax add $0x2c1,%eax jmp 401017 mov $0x0,%eax sub $0x3b4,%eax jmp 481023 mov $0x0,%eax add $0x28c,%eax jmp 40102f mov $0x0, %eax sub $x33b,%eax jmp 40183b mov $0x0,%eax add $0x323,%eax jmp 401047 mov $0x0,%eax sub $0x343,%eax jmp 401058 callq 40166e mov $0x0,%eax p -0x4(%rbp),%eax je 401962 callq 40166e leaveq e8 8b 06 00 00 83 7d f8 07 *0x402700(,%rax, 8) b8 65 03 00 00 b8 00 00 00 00 2d b2 03 00 00 b8 00 00 00 00 05 c1 02 00 00 b8 00 00 00 00 2d b4 03 00 00 b8 00 00 00 00 05 8c 02 00 00 b8 00 00 00 00 2d 3b 03 00 00 b8 00 00 00 00 05 23 03 00 00 b8 00 00 00 00 2d 43 03 00 00 e8 1b 06 00 00 b8 00 00 00 00 e8 8c 86 00 00 C3