15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Dissecting Programs with a Disassembler 105<br />

Book I<br />

Chapter 4<br />

Figure 4-10:<br />

An installer<br />

lets you<br />

define<br />

which files<br />

to copy and<br />

where to<br />

store them<br />

on a hard<br />

disk.<br />

Programming Tools<br />

Dissecting Programs with a Disassembler<br />

A disassembler acts like a reverse compiler. A compiler converts your program<br />

(written in any <strong>programming</strong> language, such as C++ or Pascal) into<br />

machine language, a disassembler takes an executable file (which contains<br />

machine language code) and converts it into assembly language.<br />

Disassemblers can’t convert machine language back into its original source<br />

code language (such as C++) because disassemblers can’t tell which <strong>programming</strong><br />

language was originally used. An executable file created from a C++ program<br />

looks no different than an executable file created from a Pascal or BASIC<br />

program. There<strong>for</strong>e, disassemblers simply convert machine language into<br />

assembly language.<br />

Disassemblers have both honorable and shady uses. On the honorable side,<br />

antivirus companies use disassemblers to dissect how the latest viruses,<br />

worms, and Trojan Horses work. After they know how these nasty programs<br />

work, they can figure out how to detect, stop, and remove these malicious<br />

programs.<br />

On the shady side, many companies use disassemblers to tear apart their rival’s<br />

products and see how they work. After you know how a competitor’s program<br />

works, you can copy those features and use them in your own program.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!