Decompiling ARM asm back to C

A few years ago, I wrote a good assembler procedure for ARM, and over the years it worked very well on the embedded ARM systems for which it was developed. Now it was time to port it to non-ARM systems, and I was wondering if there was a tool or some method to take the source of the ARM assembler and get a rudimentary C file from it. I could do it myself in a couple of days, but it would be nice to have a starting point. Even better if the application or method was free :)

Any suggestions?

+4
source share
2 answers

I do not know such a tool, unfortunately ... It would be nice ...; )

Therefore, the only suggestion I can give is to focus on logic.

You wrote the assembly code. So you know what to do with the code. Converting it to C code should not be so difficult, even with the ARM assembly.

I mean, porting the C assembly to ARM can be a difficult task. But for the inverse option, if you know the logic of the code, and if you know how to write C, that should just be fine ...

Creates C structures to facilitate the memory areas you work with. About algorithms, they will not change. Just translate what you are doing from assembly to C using some structures, etc.

Sorry, I can give you such a tool ...

Good luck :)

+2
source

Hex-Rays decompiler plugin for IDA Pro can decompile ARM. This is somewhat expensive, so probably not the best choice if you need only one procedure.

+3
source

Source: https://habr.com/ru/post/1314985/


All Articles