放上老外发布的FPAK文件解包器。
1 ?8 p9 _( P) E" }9 F4 j
* o' H& M, I% ?2 [" j, S; F# Tibet Quest
8 m( M5 f5 Y4 @( a7 K7 N( r# script for QuickBMS http://aluigi.org/papers.htm#quickbms% q# {$ l. G c" y5 P ?: |! W) ]
quickbmsver 0.2.1 # needed for the "binary" type used for MEMORY_FILE2
4 k5 f# z! m0 z3 V7 ^6 Midstring FPAK H. Q! M" D: j+ _5 G' J& C
get DUMMY long
3 U3 a7 {8 K/ @1 X* R+ T/ gget DUMMY long+ b, [% `* D3 Q+ Q5 \) u
get FILES long# B$ n! Y9 F0 M/ w6 T
set INFO_SIZE long FILES% m4 Q) b2 a+ `! i
math INFO_SIZE *= 737 ~) g3 I2 ]' c/ U+ M5 [2 H: N
savepos INFO_OFFSET
4 B8 V8 Q- c- Z4 `$ Blog MEMORY_FILE INFO_OFFSET INFO_SIZE, e4 U8 K' W6 m. X6 A
set VAR_A long INFO_SIZE% i! F; q! v# w
math VAR_A -= 0x27
9 y0 V4 Y9 w/ U! v( V4 tset VAR_C long 0xad
& u, z& V, m3 j: y" D$ Hset VAR_D long 0x6f8 x- D8 H9 y2 m6 ^5 m( i
for i = 0 < INFO_SIZE( Q4 i, G$ }+ K0 k' m* o B2 J
math VAR_A += VAR_C7 Y1 B6 o; |' D4 W V0 _( t0 W9 |8 v
math VAR_C += VAR_A9 P1 {' k$ P' |! n5 b3 @- k4 x% K
math VAR_D += VAR_C
6 t8 |; _, p8 ?, j' _2 V math VAR_D ^= VAR_A# Y# E+ n3 K# ]7 s/ ~( N( o9 U
math VAR_A &= 0xff # not needed
9 s& a1 c( `6 a8 D7 t! w6 @6 w$ ] math VAR_C &= 0xff # not needed p+ p* @; Y% q% _; m8 \7 U% N, D
math VAR_D &= 0xff # not needed
9 }" O5 w. E o. Z3 c" Z getvarchr BYTE MEMORY_FILE i
9 |& l0 j! ]5 x8 }+ K' M# c8 | math BYTE ^= VAR_D8 h& L2 p$ \6 [& ?
putvarchr MEMORY_FILE i BYTE
( n( t7 b! Q, `- L+ {next i
. ~8 s4 u, T. o+ N& E; Eset MEMORY_FILE2 binary "\x7B\x47\x85\xF0\x91\x8B\x2C\x94\xA7\x55\x3A\xF6\x17\xB1\xC2\x06\x6B\x64\x28\x8A\x86\x09\xCE\xA2
- |% l% O0 D; P' {5 m* h\x9F\x58\xDE\x46\xAE\x24\x63\x74\x69\x9D\xFB\xFD\x6E\x50\xE0\x12\x57\x1C\x08\xBC\x1B\xD0\xD9\x81\x01\xE4\xC7\x07\x88\x16\x76: c. S' I! N4 Q* k l- W$ I
\x49\x23\x05\xAD\x51\x38\x78\x45\x89\x5D\xCF\x2E\x20\x26\xB6\x3B\xC3\xEB\xEF\x22\xA0\x19\xC6\x6A\xBB\xA1\x41\xF5\xCB\x734 I9 ]3 @2 ^& b
\xED\xEA\x9B\x90\xA9\x2D\xAA\x15\x27\xDA\x37\xF9\x40\xA4\xE8\x67\xBF\x1E\xB8\xAC\x60\x53\xD2\x54\x1D\x68\xF7\x4F\x00\xC42 A9 u1 h4 o+ M
\x5E\x33\x29\x14\x0C\x3F\x62\xFC\x93\xC1\xB0\xB4\x9C\x1F\x72\xAB\x11\x18\x87\xB5\xE9\xF1\x59\xF8\x36\x5C\xA3\xE3\x79
6 D- d( ?; H9 b# L" i% v8 d4 w& Y\x8C\x2F\x0A\xBA\x44\xD8\xC8\xA6\x2A\x03\xCA\x1A\x10\x35\xF3\x77\xD7\x31\xB9\x97\x43\xF2\x3D\xDF\x21\x52\x65\xB2\x34" Y* o* E) X+ f- w9 _8 T" C
\x6F\x7F\xD3\x2B\xC0\xCC\x6D\x75\xDD\x0D\x13\xDB\xE5\x02\xEE\xB3\xF4\xC9\xFE\x66\x5B\xEC\x7D\x83\x5F\xCD\x8E\xE6\x84\xD4
3 F8 _) r9 x2 O9 O- d+ D\xBE\x32\xD1\xA5\x56\xC5\x70\x9E\x0B\x9A\x80\x6C\x5A\xE7\x7A\x7C\xB7\x7E\xFA\xDC\x0F\xE1\x4B\x4C\x8F\x4A\x04\x4E\xA8' }3 C! ], A# c2 ]9 R+ ^! `
\xFF\x3C\xD6\x0E\x95\x39\x82\x42\x3E\x61\x96\x48\x8D\xAF\x30\xE2\x71\x4D\xD5\x25\x92\xBD\x99\x98"3 A/ L( v b- [5 z" i" F! m
for i = 0 < FILES
: K9 }: y1 o/ Z! j getdstring NAME 0x41 MEMORY_FILE3 D* L. x; S; {7 l0 D& L/ k
get OFFSET long MEMORY_FILE
, X6 {8 o% }# B* Y$ x get SIZE long MEMORY_FILE# W5 L4 @! l0 L( s/ E& ]1 @1 j4 s- {
log MEMORY_FILE3 OFFSET SIZE
, b- A- o- B* @8 k/ i J4 ? for j = 0 < SIZE# K' ^" S* a4 F7 q6 a; u# B
getvarchr BYTE MEMORY_FILE3 j
& a5 s# `! ]) S/ n getvarchr BYTE MEMORY_FILE2 BYTE% |. U; @" k" v& L
putvarchr MEMORY_FILE3 j BYTE
$ A$ w; b8 U* l1 [5 v, a next j
! t |: O9 Y. h0 Q" r0 Q; c* l log NAME 0 SIZE MEMORY_FILE3" H% R4 t8 J$ z1 t
next i |