Log in

View Full Version : unpacking a game tutorial


mambox
February 23rd, 2002, 12:54
hello,
subject seem lame but i'm looking for tutorials who explain how to unpack a huge single file...lets take motoracer3 iso its a big datafile and in the rip version there is all used (sizeless) stuff extracted from this big file...how to do that is my target.

thanks for possible reply

DakienDX
February 23rd, 2002, 17:07
Hello mambox !

I don't know motoracer3 myself, but it depends on the game how the big file is structured. Most time you can guess how the file works by simply looking at it.

The file extensions below are extensions which I've found in some games and do not necessary work on all games.
.PAK files are unpacked. They have a signature, an address where the file table starts and how long it is. After that the file data starts. If you jump to the file table, you can see path, address in file and size of every single file in the big one.
.PCK files work similar to .PAK files, but the file table is at the beginning instead of the end.
.PK3 files are ZIP files. I don't need to tell you how to work with ZIP files, do I?
.REZ files are also uncompressed, but have a more complicated header than .PAK and .PCK files.
But I've also seen files where the files header is encrypted, but the data still unencrypted. Since there are no general rules, there is not general way of handling such files.

I hope you need this information to insert your own textures into your favourite game and not to make your warez downloads smaller.

ThrawN
February 23rd, 2002, 22:50
Those large files weither they are in their own format or someone elses like Darkie gave examples of, most likly contain things like the games textures (uncompressed maybe) and even possible wav files (this is where size comes into play). Basicly you could make your own tool that searches the file for wav headers and thus extracts them to files when it finds them. Make a note also the offset you have extracted them from and how much you extracted(because you would need it to inject them backinto the large file). Once extracted you can convert em to mp3 via lame or some other tool.
As for textures im not too clued on on those formats uless its bmp :P if so then the new winrar3 does a nice job at specialy compressing graphic files now

ThrawN

mambox
February 24th, 2002, 07:06
thanks for reply....create my own tool...thats what i cant do and looking to learn how..bit too complicated at this time
secondly,yes its more to check texture internal,dont care about to do a release smaller,enough wrz floating who do it.
actually the file do 397.569.850
00000000: (offset)
42 46 56 30-12 5F 00 00-1B 00 18 01-FC 0E A8 17 (hex)
BFV0_  n¿ (ascii)
00000010:
3E 60 0A 00-78 01 EC DD-E5 EF F5 D6-D1 EE F1 3E
>` x_¦___+-_±>
00000020:
E7 D5 F9 07-CA 90 32 33-33 33 33 33-33 33 33 33
_+•-É2333333333
00000030:
33 33 73 53-66 66 4A 99-99 99 9B F8-F4 63 E9 1B
33sSffJÖÖÖ¢°_c_


i know its nothing to understand,just to watch you.
as the usual garbage,seem huge packed

can easily locate where the bit work:

56 push esi
E8BD0A0600 call .0005EE249 -----
83C410 add esp,010 ;""
83F801 cmp eax,001 ;""
0F8501010000 jne .00058D899 -----
813E42465630 cmp d,[esi],030564642 ;"0VFB"
0F85F5000000 jne .00058D899 -----
8A4E08 mov cl,[esi][00008]
33C0 xor eax,eax
F6C104 test cl,004 ;""
668B460A mov ax,[esi][0000A]
89442418 mov [esp][00018],eax
7409 je .00058D7BF -----
etc...

probably begin with too much complicated stuff..