放上老外发布的FPAK文件解包器。
1 p0 P8 G2 l3 V, Q' h! K4 e# A) _' [; u3 r9 [
# Tibet Quest
! _& k: o. |+ k# script for QuickBMS http://aluigi.org/papers.htm#quickbms
; a% M! H. v8 Q4 Z. W5 jquickbmsver 0.2.1 # needed for the "binary" type used for MEMORY_FILE2$ E1 T3 w. w" k; c( t; a3 }0 a
idstring FPAK
% [5 ?; @ l" i2 ]7 uget DUMMY long9 I- z, Q8 ]* T7 t5 ^
get DUMMY long8 ]3 Z- @; Q: \4 U
get FILES long
" W! k+ L6 w! I; Bset INFO_SIZE long FILES# W3 h% |' ~7 w( l
math INFO_SIZE *= 73
2 O& m- w ]7 ssavepos INFO_OFFSET
4 e/ {& Z9 G7 x9 _6 ^ x% Qlog MEMORY_FILE INFO_OFFSET INFO_SIZE) ^ x( Q( V4 o: M/ g
set VAR_A long INFO_SIZE
" b1 F) D0 F1 n1 r4 T' ]' }5 Wmath VAR_A -= 0x27
, ^3 {+ r6 O, F9 U+ D' @4 d; c4 Xset VAR_C long 0xad
& J8 h, j, {3 A/ }! tset VAR_D long 0x6f
- @6 p! {6 m& Z* `$ P& L7 ?/ nfor i = 0 < INFO_SIZE7 v7 b* F' J. u2 M
math VAR_A += VAR_C
) \" ?3 y( i$ _5 P$ r math VAR_C += VAR_A
8 \0 g# `% G& R7 T$ V math VAR_D += VAR_C; k6 R- }0 X' R. e. f
math VAR_D ^= VAR_A
( k- o3 J3 ^0 ^& R/ }- x r3 h math VAR_A &= 0xff # not needed
% }# @" R5 H+ A2 q+ H math VAR_C &= 0xff # not needed2 p7 k# ~8 ~/ u/ H: G( n9 {( l
math VAR_D &= 0xff # not needed# T q' ?# D5 M! H4 n- B
getvarchr BYTE MEMORY_FILE i
. e& T7 o$ ^7 K+ w Z6 k$ X, X math BYTE ^= VAR_D4 u% K7 K4 V# o+ N6 _/ O
putvarchr MEMORY_FILE i BYTE
( o5 g6 ^9 |3 z: znext i
; A w8 u. e$ q7 s2 Z0 z3 H. `3 Kset 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\xA23 X/ a3 L' }9 W; J8 L
\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
0 X4 v$ k" Q& D. _/ H\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
0 z* C* o, Q8 V1 d\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\xC45 G" f2 Y; p4 } k9 T2 @
\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/ @9 }$ k" e) J' s& t$ M: D- 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- b+ b/ G" }# ]( `
\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
8 {9 ?( ~) w- F8 y5 R+ z+ A! S4 J\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
5 K: u; T: O* A; ~& e\xFF\x3C\xD6\x0E\x95\x39\x82\x42\x3E\x61\x96\x48\x8D\xAF\x30\xE2\x71\x4D\xD5\x25\x92\xBD\x99\x98") j3 q2 D2 j3 y% l8 i6 c$ ?% Q
for i = 0 < FILES
* T! A) [5 f, y9 k+ a6 a getdstring NAME 0x41 MEMORY_FILE
0 \/ b: [9 U5 b5 } [ get OFFSET long MEMORY_FILE
" b. }( t1 t7 ]; g; @, }+ \5 H5 N get SIZE long MEMORY_FILE
$ m+ T0 @ r3 F! ? log MEMORY_FILE3 OFFSET SIZE" S$ l" i9 i# I+ r' C! k
for j = 0 < SIZE
! R2 @5 q, `7 d3 L3 S getvarchr BYTE MEMORY_FILE3 j
1 H/ T( D' c! w! D8 l) l8 z getvarchr BYTE MEMORY_FILE2 BYTE" t& t0 s( M+ r* C
putvarchr MEMORY_FILE3 j BYTE' H+ f5 W9 B: ^
next j
! P0 q ]) F$ q0 {' N; `9 H+ m log NAME 0 SIZE MEMORY_FILE32 ]; _# |# s' m
next i |