放上老外发布的FPAK文件解包器。
9 e' B. H6 ^ `- F
( Z) o8 |. ?1 z# Tibet Quest5 _* T! ?% l, J1 ]: R4 H* i
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
& c" I2 X6 A9 [* Mquickbmsver 0.2.1 # needed for the "binary" type used for MEMORY_FILE21 o: {0 K4 m( h( G+ P, R. P9 x* t! O
idstring FPAK! R6 B; k# f3 |2 B
get DUMMY long( ^4 G( s! e$ o/ R* s
get DUMMY long
7 ?+ P& G* ^' M" M2 p( x4 pget FILES long
, p9 u$ N" G; L8 Zset INFO_SIZE long FILES
; w# t5 J) I, |$ |7 j- Smath INFO_SIZE *= 736 T4 l6 ^+ B' [
savepos INFO_OFFSET
3 Z: g) @ [3 H1 u8 j9 h$ klog MEMORY_FILE INFO_OFFSET INFO_SIZE
$ ]3 O1 c( D/ Oset VAR_A long INFO_SIZE
5 l! k# E! E; H6 p ?# Q6 Tmath VAR_A -= 0x27
; z8 l* @ N- Z7 ^) `% K# e& |4 `set VAR_C long 0xad2 @/ |! Y* e# e# f+ u, v, o) G
set VAR_D long 0x6f( l2 \3 f" K3 N6 s2 f. C
for i = 0 < INFO_SIZE# f( [" p% t3 w; ]+ p
math VAR_A += VAR_C+ ~7 q# j _4 i, E; g
math VAR_C += VAR_A8 p% w7 }; d/ c( o1 S X
math VAR_D += VAR_C! M& ?, l9 p6 `' W1 v6 h
math VAR_D ^= VAR_A w0 ^ y# k0 v. ^0 r
math VAR_A &= 0xff # not needed
/ Y6 l2 R+ l* P math VAR_C &= 0xff # not needed
1 A8 J: s/ n. c math VAR_D &= 0xff # not needed5 x7 U- a0 z, R
getvarchr BYTE MEMORY_FILE i
5 F7 p1 W% `+ u/ p6 G2 D math BYTE ^= VAR_D
5 V8 d5 V, z8 \ putvarchr MEMORY_FILE i BYTE# @2 f( n- D% a* f3 I
next i
6 k; y& ^, h' O/ j5 E% ]; [set 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) f" D/ N: F5 S; w' H" f5 Q( s
\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
j4 q& |0 M& j& x# S\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
, }7 I) w8 p: r6 C% F6 ?' u' ?7 j\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
. j0 v' e- q6 K; E$ M" t5 f0 q\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* t+ c% @. ^8 ]0 L! p' N8 l* o; E! z
\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
. b6 }; v" a8 ~\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
# O8 k7 a& F% |* T; 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
2 B5 {; G2 I& d. w\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 p& `, L" k7 }( C$ ?0 W6 Ofor i = 0 < FILES: y9 d2 Y0 v0 u6 \
getdstring NAME 0x41 MEMORY_FILE3 ?2 P2 W# x, J7 r& X( t
get OFFSET long MEMORY_FILE4 C+ X1 c7 n1 O. i
get SIZE long MEMORY_FILE
4 z! \7 `* L: j1 S6 Y/ B" o! H8 y' v. h log MEMORY_FILE3 OFFSET SIZE
' |9 f6 N7 W4 A# ` for j = 0 < SIZE1 V8 b2 v5 Q; N$ H3 i6 K* s
getvarchr BYTE MEMORY_FILE3 j
; N3 X' T7 @6 }' b* C; r0 ]3 Y getvarchr BYTE MEMORY_FILE2 BYTE# D& T2 z# m( t1 f" p V& i
putvarchr MEMORY_FILE3 j BYTE
Z* Y" o4 ~" {5 r, ~1 K next j* Q v4 A2 K5 R7 k9 n+ ?/ L
log NAME 0 SIZE MEMORY_FILE3& ]8 `$ @6 C% e" f# s5 u
next i |