Monday, October 10, 2022

[SOLVED] reverse engineering in C; bomb lab

Issue

I am doing a lab for my cs class and we are reverse engineering a "binary bomb". I am confused on a few assembler instructions. If anyone could explain what these do and how the work I would greatly appreciate it.

lea   0x10(%rbx), %rbp. 

Im pretty sure rbx is supposed to hold the address of rbp, but im confused on the 0x10 argument.

mov   0x4(%rbx), %eax. 

Same thing as above, don't understand what the 0x4 argument is.


Solution

These are offsets (0x10 = 16bytes and 0x4=4bytes) to the pointers in rbp and eax. Most likely iterating over elements in an array/vector.



Answered By - Gabriel
Answer Checked By - Marilyn (WPSolving Volunteer)