Professional Documents
Culture Documents
Vol rm1
Vol rm1
Vol rm1
�� ____ __ __ ����
�� / _/_ _ __ _ ___ ____/ /____ _/ / �� ���
�� _/ // ' \/ ' \/ _ \/ __/ __/ _ `/ / �� � �
�� /___/_/_/_/_/_/_/\___/_/ \__/\_,_/_/ �� � �
�� ____ __ __ �� � �
�� / __ \___ ___ _______ ___ ___/ /__ ____ / /____�� � �
�� / /_/ / -_|_-</ __/ -_) _ \/ _ / _ `/ _ \/ __(_-<�� � �
��/_____/\__/___/\__/\__/_//_/\_,_/\_,_/_//_/\__/___/�� � �
�� �� � �
�� Web: http://www.ImmortalDescendants.com �� � �
�� Author: Volatility �� � �
�� Date: 01/03/00 �� � �
�� Topic: Adding Functionality �� � �
�� Level: Intermediate �� � �
�� �� � �
������������������������������������������������������� � �
������������������������������������������������������� �
�������������������������������������������������������
===============================================================
INTRODUCTION
===============================================================
Greetings! This essay is being written specifically for the
Reverse EngineerZINE, as the target, douby's Reverseme is now
the official practice for the zine, but I'll add it to our
database as well, as it should serve purpose there too :) The
target can be found here:
http://www.ImmortalDescendants.com/re-zine/files/reversme1.zip
What we're going to learn to do today is actually ADDING
functionality to a program -- this is TRUE reversing in my
humble opinion :) I have to thank douby of DREAD right off the
bat, for holding my hand while entering this uncharted
territory :)
===============================================================
TOOLS NEEDED
===============================================================
W32dasm or IDA (I'm using Wdasm in this essay)
Soft-Ice 4.02 (or any version you wish)
HIEW (or other hex editor)
MSDN
===============================================================
THE ESSAY
===============================================================
After reading douby's readme file, we'll see that there are
four tasks for this Reverseme: 1) enable the load function 2)
enable the save function 3) enable the exit function and 4)
add a scrollbar to the edit box.
Now, get your MSDN cd's ready... if you don't have the cd's,
we'll just use msdn.microsoft.com for now, so load the page
and lets do a search for CreateWindowEx. There will be
several links, just click on the first one. Now we have all
the specifications of the CreateWindowEx function. What
we're interested in, is "DWORD dwStyle, // window style",
since scrollbars are a style. Let's click on the "dwStyle"
link, and then the "window styles" link. What do we see all
the way at the bottom? WS_VSCROLL :)
Now that we have the style, let's look into the actual window
a bit. Let's go back to the main CreateWindowEx page, and
look for the type of window we'll be working with. Down
towards the bottom of the page, we'll get a table of the
class names. You can probably figure out which of these
it is... if not, take a look at "EDIT", and read what it
says :)
From all this, we know know that the code would look
something like the following:
What good does this do us? Well, take a look at the EDIT
parameter... looks like a string, doesn't it? Now we have
something to look for in Soft-Ice. Let's set a breakpoint
on CreateWindowExA in Soft-Ice, run the program, then F12 out
and see what we can find. You should be here:
The first push is the hardcoded value for all the combined
styles. What should the second push be? Well, remember the
"EDIT" string we talked about? Let's do a d 004050D4, and
what do we see?
Volatility (Volatility@ImmortalDescendants.com)
===============================================================
GREETINGS (in alphabetical order, not importance :)
===============================================================
INDIVIDUALS: ACiD_BuRN, alpine, Corn, douby, JosephCo, knotty,
Latigo, LaZaRuS, Lord Soth, Lucifer48, Neural, _pain, +Sandman,
S^Witz, Tornado, WarezPup, X-Calibre, Yoshi, and everyone I forgot
(probably MANY)
GROUPS: DREAD, HellForge, RingZer0, Tres2000