Click here to Skip to main content
15,896,207 members

Convert ASM file to Exe

MohammadSina Karvandi asked:

Open original thread
Hi ,

According my reverse engineering , I use objdump.exe in windows .
now this I use this command :
objdump -d MyFile.exe >>MyFile.asm

It will convert my exe file to asm and then MyFile.asm is sth like this :
MyFile.exe:     file format pei-i386


Disassembly of section .text:

00401000 <.text>:
  401000:	55                   	push   %ebp
  401001:	89 e5                	mov    %esp,%ebp
  401003:	53                   	push   %ebx
  401004:	83 ec 34             	sub    $0x34,%esp
  401007:	a1 80 9e 60 00       	mov    0x609e80,%eax
  40100c:	85 c0                	test   %eax,%eax
  40100e:	74 1c                	je     0x40102c
  401010:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  401017:	00 
  401018:	c7 44 24 04 02 00 00 	movl   $0x2,0x4(%esp)
  40101f:	00 
  401020:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  401027:	ff d0                	call   *%eax
  401029:	83 ec 0c             	sub    $0xc,%esp
  40102c:	c7 04 24 10 11 40 00 	movl   $0x401110,(%esp)
  401033:	e8 e0 d9 0b 00       	call   0x4bea18


...

Now and after my edit I want to convert this file to an .exe file again !
I have been trying to do this with sth like NASM Or Borland TASM .

But they all give me error . I think this template(MyFile.asm) are unknown for both of them .
So , Is there any way to convert it to exe or give another way to convert exe to asm file and recompile it again using NASM or TASM ?!

Another question is that I think the gcc convert only *.c file to asm and cannot convert *.exe to .asm file ! is it correct ?!

thanks in advance
Tags: ASM, Windows

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900