home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TCE Demo 2
/
TCE_DEMO_CD2.iso
/
demo_cd_.2
/
mags
/
stosser
/
stoser08.arj
/
stoser08.msa
/
ISSUE_8
/
5.PNE
< prev
next >
Wrap
Text File
|
1987-04-22
|
7KB
|
170 lines
AN 'INTERESTING' DOC FILE BY ANDY CATO
-----------------------
FILE 1
HOW TO DEPACK EXECUTABLE FILES
USING MONST
-------------------------------
This is the start of a munber of 'interesting' docs aimed at
those of you out there that are interested in possibly trying
to rip stuff from your demos/games etc. First of all, to rip
anything you must have it in memory in the first place. Now
the best way to do this would be to buy a ripping cartridge
which i'm sure those of you out there who have got one would
agree. Failing that then some sort of program that can do a
similar thing. There are a number of them about including
the excellent Adrenaline ripper. Others are the Fuzion Mega
Ripper, Probe St and many others I could mention.
If you are more interseted in actually 'getting inside ' a
program then keep reading because you will find this doc
very 'interesting'.
This doc will teach you the basics of 'getting inside' a
packed program to depack it.
You don't need to know any assembler to understand this doc
but if you do it helps. I have tried to make it as easy as
possible to read and understand, so just follow the
instructions and you won't go wrong - believe me.
All you need is Monst2 and a little patience (and that's not
a group of ill dwarves).
Before we start I'd just like to point out that assembler is
not that difficult if you have the right books and tools. I
started off with Monst after reading the article in ST Format
years ago on how to train a game, and ever since then i've
been hooked. THE book to get is ATARI ST INTERNALS by ABACUS
SOFTWARE. ISBN 0-916439-46-1. This will tell you all you
need to know about assembly programming to get started. You
could also learn as I did by using Easy Rider. This is a
disassembler which takes programs back down to their original
code so you can change it and re-assemble through Genst it to
see what does what.
Ok then on with the show.............
Read this very carefully, I shall only type it once!
1 Load Monst2 in low or medium res from desktop. It doesn't
matter about the resolution because you can press Ctrl + O
in Monst to change screen modes.
2 You will now be looking at a prompt to load an executable
file, if not then press Ctrl + L to get this prompt up.
Enter your file to load and press return twice.
The file will now be loaded and in the Disassembly PC screen
there should be some code and an arrow pointing to the first
line of that code. This arrow is known as the Program
Counter or PC and indicates which line of code is to be run
next.
3 Press W to fill memory. You will be prompted for a start
address, an end address and data to fill with.
Ok then, type the following:
A4,A4+(A7-A4-1),EE then press return
4 This will fill all of your memory with loads of Es from the
end of your packed file. This should be enough for most
programs.
5 Now to unpack the file.
6 Most depacking routines have two main parts to them and are
seperated by a common instruction called a jump (JMP).
To search for the first JMP type the following:
G then I then JMP then press return
You should now be looking at an instruction something like
JMP (A1) or
JMP (A2) or
JMP (A3) or
JMP (A4) or even something like
JMP -$20(A7)
or something similar to these instructions as long as there
are no question marks in the instruction.
7 Having found the JMP press Ctrl + B to set a breakpoint at
that address. A [1] should appear to the right of the
instruction.
8 Press either Ctrl + R or R then G to run the program up to
this address.
9 All having gone well you should be at the address where you
set the breakpoint. Press Ctrl + T once to run that
instruction.
10 The code will now have jumped to the next part of the
routine so press N to find the next JMP (which should be
quite close ). Follow steps 7 to 9 again.
11 Your packed file is now unpacked and is ready to save.
12 Press TAB until you are in the memory screen then press M
then PC then press return then type the following:
G then L then EEEEEEEE (8 Es in all) then press return.
This will search for the data you filled memory with earlier
on. You may find a small group of Es here and there but
press N until you find a large group of them. If you get
lost when searching then Press M then PC to get back to the
start of the program then try again.
13 Having found a large group of Es MAKE A NOTE OF THE ADDRESS
OF THE START OF THEM.
You can find out how big the unpacked file is by doing this:
Press O and you will be asked to enter an expression.
Enter the address you made a note of then minus then PC then
return. This will give you a Hex value and a decimal value
underneath after you press return.
eg. $103060-PC (the Es address minus the start of the program)
13a Press S for the save file prompt.
Now type in your file name to save then press return.
You will be asked for a start and end address. For the start
type in PC, then for the end type in the address you made a
note of then press return to save.
14 Your file will be saved as a data file and not a file you can
run so don't try and run it 'cos it won't work.
15 Once saved you can then hack your way through with all those
rippers that couldn't find anything before.
The above routine will work on most programs but there are a
few types that it won't work on, namely link-filed programs
and some depackers that need decrypting first, but that's a
whole new subject and i'm tired of typing so tough ****.
Hope some of you out there you found this doc file useful.
And have maybe learned a bit about assembler in the process.
Look out for more 'interesting' docs in the future.
All spolling mestakes are mi owen
Spread me, i'm jam.