From: s2859479@techst02.technion.ac.il (Yaron Keren)
Subject: Here's unpak utility for WestWood .PAK files
Reply-To: s2859479@techst02.technion.ac.il (Yaron Keren)
Organization: Technion, Israel Inst. of Technology
Date: Sat, 26 Dec 1992 08:36:38 GMT

Just a small utility for unpacking the files inside a .PAK archive like
those found in DUNE II (of westwood).

The file format is extremely simple:
directory structure: file offset(4 bytes) filename(asciiz)
             end of: 0000(4 bytes)
file0
file1
...

Would someone write a packer?

With both my unpacker and a packer, one could change the voices in the game...
or the initialization files of the battles.

Unpacker follows uuencoded:

section 1 of uuencode 4.02 of file unpak.exe    by R.E.M.

begin 644 unpak.exe
M35K0`0L`2@`5`&@1:+&P#@!```"L````'````*\```"Z````SP```-0```#9O
M````W@```/0```#Y````_@```!,!```8`0``)`$``"D!``!/`0``5`$``&T!O
M``")`0``C@$``),!``"P`0``M0$``,X!``#=`0``X@$``.\!```"`@``$@(`E
M`"8"``!&`@``2P(``'T"``"/`@``E`(``*D"``##`@``S`(``.0"``#Q`@``M
M!@,``"4#``!.`P``4P,``%@#``!V`P``@@,``(X#``">`P``IP,``+8#``#"3
M`P``QP,``,P#``#=`P``ZP,``/<#``#\`P``%00``"`$```E!```/@0``$@$W
M``!-!```5P0``%P$``!Q!```=@0``'X$```!`$@`&P%(`!`#2`!E#4@`@`U(8
M`)8-2`"U#4@`````````````````/55.4$%+('=E<W1W;V]D("Y004L@9FEL.
M97,@("`@("`@("A#*6]P>7)I9VAT(%EA<F]N($ME<F5N(#$Y.3(.54Y004L@Z
M9FEL96YA;648=&]O(&UA;GD@9FEL97,L('-K:7!P:6YG`0```,@````B=V%R(
M;FEN9SH@;&5N9W1H('1O;R!B:6<L('1R=6YC871E9`H@8W)E871I;F<@!R!BL
M>71E<RX`````__\``)H``$@`58GEN``"FLT"2`"![``"OXK5'E>_```.5VH`T
MF@$'2`":W05(`)J1`D@`FLL)2``]`0!T'K^*U1Y7OSX`#E=J`)H!!T@`FMT%R
M2`":D0)(`.EU`[\J#QY7C;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O0N?__BQVX`D+-1
M(3/)BQVT0,TAPXO/O@H`B]H+VWD1]]OWV(/;`.@'`$\FQ@4M0<,STI/W]I/WA
M]H#",(#Z.G(#@,('3R:(%8O0"]-UXRO/PS/`,](S]N-=)H`]*W0')H`]+74%<
M3D=)=$PF@#TD=$@FBAV`ZSJ`PPIS)?;&\'4V4]'@T=)24-'@T=+1X-'26P/#G
M6Q/36S+_`\.#T@!'XM"+V`O:=`\+]GD']]KWV(/:`#/R>`'#^<-'273Z)HH=2
M@/MA<@.`ZR"`ZSJ`PPIR"X#K%X##!G/)@,,*MP31X-'2<M3^SW7V"L-'XM$+:
M]GD']]KWV(/:`/C#Z$0`<@\FBTT$@_D!=`8SVP[H,_O*!`#H+0!R$XO!B],FQ
MBTT$@_D!=`8SVP[H&/O*!`#H$@!R"RO!&]-R!;`!R@0`,L#*!`"+W#;$?P8FR
M@7T"L]=U*S/),](FBQVX`4+-(5)0,\DSTB:+';@"0LTA6UE24(O3)HL=N`!"1
MS2%96\/'!CP`9P`SP#/2^<._4@`>![G6UBO/T>DSP/SSJ\,`````````````V
M````````````````````````__\`````````````````````````````````Z
M```````````````````````````00```H`"P`+@```(`#0H`````````````H
$`````````
``
end
sum -r/size 58864/7850 section (from "begin" to "end")
sum -r/size 50163/5584 entire input file

-- 
Yaron Keren                                 s2859479@techst02.technion.ac.il
Newsgroups: comp.sys.ibm.pc.games