Updated Decompiling a function (markdown)

AnonymousRandomPerson 2023-08-25 17:51:09 -04:00
parent 365770415e
commit 7ee82b62ef

@ -1,4 +1,4 @@
Function decompilation (decomp) is one of the core areas of a decomp project. In the ROM, functions are encoded as ARM (or THUMB) assembly code, and the goal is to transform this assembly into C code that produces the exact same lines of assembly when compiled. C code is easier to read and modify than assembly, making a decompiled C function easier to hack or research with.
Function decompilation (decomp) is one of the core areas of a decomp project. In the ROM, functions are encoded as ARM (or THUMB) assembly code, and the goal is to transform this assembly into C code that produces the exact same lines of assembly when compiled (often called "matching"). C code is easier to read and modify than assembly, making a decompiled C function easier to hack or research with.
To decompile a function, you need to know both ARM assembly and C. It is also helpful (but not required) to use a reverse engineering tool like [Ghidra](https://ghidra-sre.org/) or [IDA](https://hex-rays.com/ida-pro/).