Reverse Engineering

Overview

For the purposes of this wiki, reverse engineering is the process of disassembling or decompiling code, in order to understand how it works. This might be to satisfy a passing interest, or even to produce source code which can be once again assembled or compiled.

The Amiga as a platform is long obsolete. However, in its day, it was extremely popular and a wide variety of applications, games, demos and more, were created for it. The loss of the functionality or experiences these provide would be great, and to be able to reverse engineer them to extract their value and perhaps put it to future use, is appealing.

Approaches

Disassembling

This is the most straightforward approach to reverse engineering. It generally involves you pointing a tool at some data, and after some work on the part of the tool and perhaps also yourself, assembly language source code is generated.

Decompilation

The holy grail of reverse engineering approaches. In an ideal world, you would point a tool at some data, and after some work on the part of the tool and perhaps also yourself, higher level language source code is generated. Most likely, this would be C. You would not have to interpret exactly what a sequence of instructions was doing, how what it did with a memory location affected anything, or even why the instructions were laid out the way they were! Unfortunately, like the holy grail, straightforward decompilation is also a thing of myth and legend.

Decompilation is the process of generating source code in a higher level language than assembly language.

Debugging

The act of disassembling is a manual one. You read the code and follow the possible execution paths within it manually. To an extent, you might be able to follow used labels like links, but that is still merely exercising the interactive functionality of the disassembler.

Debugging the code you are interested in provides a completely different viewpoint, allowing you to see what the code actually does, the values passed around in the registers or on the stack, with the application running and potentially interactive.

Emulation

An emulator is a virtual machine. It allows you to model the use of another computer, without actually having to have the required architecture.

Emulation allows you to, among other things, gain the benefits of debugging code natively, without actually having to. You can snapshot areas of memory, pause the machine, extract data and pass it out to your real operating system and file system, and more.

Unpacking

The material you would like to reverse engineer, is not always directly accessible. Often, due to the small amounts of disk space available to the Amiga computer, it will be compressed.

Unpacking is the extraction of the uncompressed data, so that it can be accessed by a disassembler.

Other Information

Wiki References

External Links

Reverse engineering - The Wikipedia entry for reverse engineering.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License