5

Just started out with x86 assembly and slowly getting the hang of it. IDA produces nice graphs that make it much easier to follow all the jumps and function calls and stuff.

I've looked at examples of arithmetics, control flow, loops, and function calls, and feel that I could reasonably take a chunk of instructions and reproduce the same logic in Java or C.

Are there tools that will automatically take assembly and convert it to, say, C? I imagine for some people that at some point it becomes more of a chore than an exercise after doing it for years.

4
  • An example I saw before is a simple XOR encryption algorithm that used a 64 KB key for some reason. That's not something you want to type out manually... Commented Jun 19, 2014 at 21:19
  • 1
    Decompilation is not that simple, the most complex thing is about rebuilding the high-level structures of the program that have been lost during the compilation process (variables, functions, modules/classes, ...). Commented Jun 19, 2014 at 21:32
  • @perror I'm thinking more along the lines of subroutines and low-level structures. For example, after digging around with a debugger I've pinpointed the exact set of subroutines that perform a certain operation, and that is all that I need. Oh except there are a million instructions involved. Commented Jun 19, 2014 at 21:40
  • You can use decompiler in IDA to produce a C file. It's not included in free version of IDA though. Commented Jun 20, 2014 at 7:57

2 Answers 2

12

Yes, that type of tool is called a

Several examples below:

0
0

There's also asm2c that works on assembly source code instead of executables or objects files.

Swift tool to transform DOS/PMODEW 386 TASM Assembly code to C code

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.