Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  What assembler variant does IDA export ASM for?

Topic created on: February 22, 2010 20:36 CST by kowboykoder .

Hi all.

I've just gotten into Assembler development after 5 ish years of high level coding. I wanted to see how a simple high (ish) level app would look in assembly, so I wrote an empty C program [int main(){return 0;}], compiled it, decompiled it using IDA and tried compiling the ASM again, but it fails.

I've tried compiling the ASM outputted by IDA Pro (free) using A86 and MASM32, but neither Assembly Compiler accepts the 1500 lines of assembly outputted by IDA as valid.

So to conclude, what assembler variant does IDA export for specifically? TASM, NASM, etc?

Thanks all

  Silkut     February 26, 2010 10:44.04 CST
You're doing it wrong(ish :p)
IDA is not really decompiling per say (turned back into source language, unless you use HexRays decompiler but its experimental), it is disassembling your program (`translated` to assembly).
In no situation it is made to produce an entire ready-to-compile assembly code, and you can easily notice that by the overbloated source you got after computing it compared to your program :p

  cseagle     February 27, 2010 00:21.13 CST
That is not entirely true.  First IDA uses something of a hybrid asm syntax, based on the Intel syntax.  I often use some simple scripts to dump functions in a nasm compatible syntax.  If you are going to save the entire database as a .asm file using File/Produce, then you will probably need to do a lot of editing depending on what assembler you intend to use.  You may want to eliminate a lot of the library code added by the compiler such as the start routine among other things depending on how you prefer to re-assemble the program.

  anoirel   March 1, 2010 14:14.40 CST
Chris is right, lot's of editing will be required. This problem has already been solved here.
http://www.openrce.org/forums/posts/951

Note: Registration is required to post to the forums.

There are 31,322 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
hi!
Jul/01
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit