Click here to Skip to main content
15,436,489 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Updated 25-Nov-17 20:07pm

1 solution

It depends on the platform. Also, different Assemblers require somewhat different Assembly languages.

This is two-step process: compilation and then linking. The tools to use on several factors. It looks like you use old tools for DOS platform, which is mostly long gone. You need to use the assembler (compiler) and then matching linker. I have no idea where to take it these days. Perhaps you can find all you need in FreeDOS or ask somewhere in FreeDOS community:[^],[^].

I never tried though.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

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