Practical Reverse Engineering Exercise Solutions: Page 78 / Exercise 2
Exercise 2 of the ARM chapter has a rather short disassembly compared to the first exercise. Again, we are tasked with the decompilation of the provided function mystery2
.
The disassembly is as follows:
|
|
First of all, we notice that the function has been compiled in Thumb mode, as there are several instructions having a width of 16 bits, which is not possible in ARM mode. Furthermore, the instructions CBZ
and IT
are specific to Thumb mode and not available in ARM mode.