放上老外发布的FPAK文件解包器。% X% t$ I3 m5 N$ S! P
+ |" J3 b4 `: N% ~0 S) C( e2 v
# Tibet Quest* e) n( c1 o1 z- s1 V. T
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
5 z, q: ^8 w$ s4 d/ iquickbmsver 0.2.1 # needed for the "binary" type used for MEMORY_FILE25 i3 X4 [0 X/ A% C* K
idstring FPAK
5 w* p5 z$ {+ B/ s3 Bget DUMMY long
( R0 Y1 n0 _* X) z" Aget DUMMY long
! C4 x" P2 Y9 B u0 K9 d' iget FILES long& w# |7 h% f d. g, y$ x
set INFO_SIZE long FILES7 ` u0 _6 ]' P
math INFO_SIZE *= 73
3 n6 T4 Z# M0 N# `% Y/ `savepos INFO_OFFSET
+ E$ p- g; b) E" S* z( y8 P% Alog MEMORY_FILE INFO_OFFSET INFO_SIZE4 j, Y" r' l: r! `& ~% t
set VAR_A long INFO_SIZE9 Q/ [5 k8 L Q
math VAR_A -= 0x27
t; {& u5 j5 P2 m; A8 F$ C3 vset VAR_C long 0xad
7 A* s" y) J' F- o& z! T& j1 ] Xset VAR_D long 0x6f- V; q/ K. d# A$ p
for i = 0 < INFO_SIZE
6 M6 [$ W" y2 z( ?' ^+ x! v* Z math VAR_A += VAR_C1 z' d6 z5 U- i v
math VAR_C += VAR_A
: {: L4 p, k% E3 }0 w h0 y math VAR_D += VAR_C
1 z, f! y2 Z. I% _" D math VAR_D ^= VAR_A
# d, W! _( Z. N4 c math VAR_A &= 0xff # not needed- q: E. h) i0 E% \& p3 S) d0 Y* ~
math VAR_C &= 0xff # not needed
. S+ [8 z5 W) S4 I math VAR_D &= 0xff # not needed
- n8 i9 I" W, C4 `. [" G) p getvarchr BYTE MEMORY_FILE i5 n, J6 B" e1 X/ g& C
math BYTE ^= VAR_D
; j: q6 w& S, M6 e8 {% x putvarchr MEMORY_FILE i BYTE% L0 [. A0 J/ g% R; T4 g7 a
next i
, Z* ^7 u; ^& @6 u2 Xset 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: [* }( C; W7 g* Y2 x
\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
4 a; a0 z( p4 Z0 e6 g. E\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\x73
9 i s: X; J1 L. T% n4 O3 A\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\xC4+ W1 n V' g9 O5 Q/ E0 M6 f; I
\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. _" x! t' T# b @( K, t3 O/ q
\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\x347 S3 M. j8 @9 H+ e1 Q6 N
\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
6 V& Q3 y! s: ?+ S\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% @9 K+ {1 G" i
\xFF\x3C\xD6\x0E\x95\x39\x82\x42\x3E\x61\x96\x48\x8D\xAF\x30\xE2\x71\x4D\xD5\x25\x92\xBD\x99\x98"
9 i- o; a! X# ifor i = 0 < FILES
4 E. |: p8 Y2 H$ A& C! Z3 [6 v getdstring NAME 0x41 MEMORY_FILE% j1 Y, Z: C1 K V! i% a
get OFFSET long MEMORY_FILE( p5 k$ {6 u. F7 Y; _* r5 Y
get SIZE long MEMORY_FILE) o( g# V. p7 y. ~, j/ X
log MEMORY_FILE3 OFFSET SIZE
. ]2 o. D ^2 ]6 i6 \! |: Z for j = 0 < SIZE) V6 x& `* i& I$ d. t' ]
getvarchr BYTE MEMORY_FILE3 j0 \+ q! ~8 J2 o
getvarchr BYTE MEMORY_FILE2 BYTE9 \$ l4 n8 Q, Z3 {! a2 B& Q
putvarchr MEMORY_FILE3 j BYTE
8 u0 }8 o c. b0 Z3 m" ~ next j' k! D7 Y) U8 T, Z; [
log NAME 0 SIZE MEMORY_FILE3. p8 ~) g, f# a2 Z4 S1 A
next i |