views:

88

answers:

3

Hello.

I'm looking for a (preferably free) tool that can produce "proper" disassembly listing from a (non-.NET) windows PE file (*.exe or *.dll).

Important requirement: it should be possible to run the listing through a windows assembler (nasm, masm or whatever) and get working exe again (not necessarily identical to original one, but it should behave in the same way).

Intended usage is adding new subroutines into existing code, when source is not available.

Ideally, tool should be able to detect function/segment boundaries, API calls, and generate proper labels for jumps (I can live without labels for loops/jumps, though, but function boundary detection would be nice), and keep program resources/segments in place.

I'm already aware of IdaPRO(not free), OllyDBG (useful for in-place hacking, doesn't generate disassembly listing, AFAIK), ndisasm (output isn't suitable for assembler), dumpbin (useful, but AFAIK, output isn't suitable for assembler) and "proxy dll" technique.

Ideas? Or maybe there is a book/tutorial that explains some kind of alternative approach?

A: 

I'm not positive it does exactly what you want but have you tried PEiD?

Peter McGrattan
It looks like it doesn't do what I want. PEiD gives you a lot of info about PE file, but doesn't allow to pull it apart and turn it into bunch of asm listings. There is a builtin disassembler, sure, but it looks like it isn't exactly what I've been looking for...
SigTerm
A: 

You say you're aware of IdaPRO, but are you also aware of IdaFree?

500 - Internal Server Error
Are you talking about 4.9 Freeware version of Ida PRO or about some other software?
SigTerm
No, that's the one I'm talking about.
500 - Internal Server Error
Not a solution I've been looking for, but I'll mark it as accepted.
SigTerm
A: 

Also,check out Oilly. It's a pretty neat application and very intuitive too. You can disassemble and hex edit. Ideal for small to medium size projects.

Epitaph
Do you mean OllyDbg? I agree, it's great. Even lets you inject new instructions and save the binary... if you're into that sort of thing.
Eric