Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 1.71 KB

part-27-debugging-integer-variables.md

File metadata and controls

23 lines (12 loc) · 1.71 KB

Part 27 – Debugging Integer Variables

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Reverse-Engineering-Tutorial

Let’s review our code. I again want to include the below information from last week’s lesson to emphasize what is going on regarding integers.

A 32-bit register can store 2^32 different values. The range of integer values that can be stored in 32 bits depends on the integer representation used. With the two most common representations, the range is 0 through 4,294,967,295 (2^32 − 1) for representation as an (unsigned) binary number, and −2,147,483,648 (−2^31) through 2,147,483,647 (2^31 − 1) for representation as two's complement.

Keep in mind with 32-bit memory addresses you can directly access a maximum of 4 GB of byte-addressable memory.

Let’s debug!

We see at __main+12 __the address at __0x10730 __loading data into r3. Let’s take a closer look.

When we examine the data inside 0x10730 we clearly see the integer 777 present. When we continue we see __777 __echoed back to the terminal which makes sense as we utilized the cout function within c++.#linux #arm #asm #cplusplus #reverseengineering

Next week we will dive into Hacking Integer Variables.