Script by h4x0r and chrrox
Game: Dragon Sword (JianLong)
For unpack you need QuickBMS Tool.
PHP Code:
# Dragon Sword (JianLong) (BAG format)
#
# Written by Ekey (h4x0r) / a little from chrrox
# https://progamercity.net
#
# script for QuickBMS http://quickbms.aluigi.org
comtype lzo1x
get PAKSIZE asize
get ID long
if ID == 0x62616731
set TotalFiles_Key "0xe7356461"
set TableOffset_Key "0xcb449442"
set UNK1_Key "0x698346bd"
set UNK2_Key "0x867389fe"
set UNK3_Key "0xabedc59d"
else ID == 0x62616732
set TotalFiles_Key "0x27252421"
set TableOffset_Key "0x3b343432"
set UNK1_Key "0x5953565d"
set UNK2_Key "0x6663696e"
set UNK3_Key "0x7b7d757d"
endif
filexor TotalFiles_Key
get FILES long
math FILES - 1
filexor TableOffset_Key
get TABLEOFFSET long
filexor ""
set TABLESIZE = PAKSIZE
math TABLESIZE -= TABLEOFFSET
math TABLESIZE -= 4
goto TABLEOFFSET
for i = 0 < FILES
filexor UNK1_Key
get HASH long
filexor UNK2_Key
get OFFSET long
filexor UNK3_Key
get SIZE long
math HASH ^ TABLEOFFSET
math OFFSET ^ TABLEOFFSET
math SIZE ^ TABLEOFFSET
filexor ""
log MEMORY_FILE OFFSET SIZE
goto 0x18 MEMORY_FILE
math SIZE -= 0x18
if SIZE > 0
get tmp long MEMORY_FILE
if tmp = 0x5A5A5A5A
get TSIZE long MEMORY_FILE
math SIZE - 0x8
clog "" 0x20 SIZE TSIZE MEMORY_FILE
else
log "" 0x18 SIZE MEMORY_FILE
endif
else
log "" OFFSET 0x18
endif
math TABLEOFFSET += 12
next i
HOW TO Use:
- Run QuickBMS
- Select script
- Select file for unpack
- Select dir to unpack
- Enjoy