View Full Version : Assembler to C
XFlorian
January 7th, 2005, 11:32
hi
I'm looking for a tutorial which describes how can I translate Assembler code oder Assembler commands into C. Does anyone no one? If so I would be very happy

dELTA
January 7th, 2005, 11:54
http://research.sun.com/people/cristina/decompilation-publications.html
Hero
January 12th, 2005, 02:17
This tutorial is great.But As I know for some languages we can't make good
decompiler such as C,C++,... and this is because of its compiler optimizer.
But for some languages like java we can find decompiler that makes decompiled
applications with a good mapping to its source code.For C,C++,... using a
dissassembler is better.
sincerely yours
4nil
January 19th, 2005, 00:35
yeah,i think c/c++ is very difficult to discompile, so there are no good discompile software for c/c++ around the world.
Aimless
January 19th, 2005, 01:18
As I understand it, you would like to do it for a better understanding of what the program does rather than trying to recompile it back again.
If that is indeed the case, you may try out:
1. A utility (wingraph works OK) that creates flowchart of your assembly program (better still, use it with IDA

)
2. Plugins for IDA like desquire and one other from Polaris (the name slips by me right now)
Be warned though, it is difficult to even think of decompiling anything but the most easiest of programs.
Have Phun
disavowed
January 19th, 2005, 01:23
Quote:
[Originally Posted by Aimless]Be warned though, it is difficult to even think of decompiling anything but the most easiest of programs. |
From personal experience of decompiling malware, I would say it's more time consuming than difficult. (Read as: EXTREMELY time consuming, and only relatively difficult)
lifewire
January 19th, 2005, 12:35
indeed, like disavowed says; it isn't very hard to do. however, you'll need quite good knowledge the language it was written in originally as well as in assembler, and some general knowledge and experience how HLL looks in assembler. the nice thing of compilers is that they are quite limited and have a well defined behavior, you can recognize locals easily, if APIs are called you can identify the type of the arguments which are passed to the API, etc. such things make life easier. on the other hand, whiles and fors are equal, etc. a lot of information disappears while compiling.
Rackmount
January 22nd, 2005, 11:35
XFlorian:
Mammon wrote a good tutorial on the very subject you are interested in. Although a bit old and dusty, it should provide you with typical logic involved in taking asm back to c.
hxxp://www.eccentrix.com/members/mammon/Text/StringManip.html
Indeed, you should read many of the other tutorials on this site as well.
Rackmount
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.