The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: maboroshi on February 20, 2005, 10:03:54 PM

Title: How to properly Disassemble then Assemble an Executable
Post by: maboroshi on February 20, 2005, 10:03:54 PM
Hi I was wondering if some one could give some advice on Disassembling and Assembling I have Disassembled Notepad.exe just for fun (I haven't made any changes yet) I tried to Assemble the code just to make sure that it would work after making changes but for some reason it won't assemble

Any Ideas

Cheers

PS I am using Masm32

Title: Re: How to properly Disassemble then Assemble an Executable
Post by: Jibz on February 21, 2005, 10:35:03 AM
Automagically disassembling code is not as easy as it may seem, and you usually need a high quality disassembler and some brain power to get something that can be reassembled to work :U.

Also, there aren't many useful legal uses of dis- and reassembling programs, so:

[standard warning]
Most software licenses prohibit reverse engineering including disassembly, and the rules of this board forbid discussions about illegal stuff.
[/standard warning]
Title: Re: How to properly Disassemble then Assemble an Executable
Post by: sluggy on February 21, 2005, 12:36:51 PM
It is also not a good way to actually learn asm.

Title: Re: How to properly Disassemble then Assemble an Executable
Post by: P1 on February 21, 2005, 03:31:01 PM
Welcome maboroshi   :U

Glad to have you here!

You will find some the best people in the world, come here to get answers, as well as give them.

If you like getting and giving help in Assembler, this is the place for you!!     :clap:

Look forward to you participating with us.     :thumbu

To avoid the legal entanglements here, I would suggest:
 
Select a example code in MASM32 distribution, assemble it with a listing for reference. 
Then dis-assemble the executable for educational purposes.  Then compare the listing to the dis-assembled output for what your looking for.  A dumppe output will help you understand some of the PE formatting of the exe file too.

Regards,  P1  :8)
Title: Re: How to properly Disassemble then Assemble an Executable
Post by: Randall Hyde on February 21, 2005, 07:57:55 PM
Why, with the RosAsm disassembler you can disassemble and reassemble the code in two clicks!
(running off to the colosseum.... :green)
Cheers,
Randy Hyde
P.S., as others have pointed out, this is not a trivial task. And it's certainly not the best way to try an learn assembly language. Try visiting http://webster.cs.ucr.edu for more help in learning assembly language.