Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

[Request] Xiang Long Zhi Jian

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

[Request] Xiang Long Zhi Jian

Post by CriticalError »

Ok I found a interesting game packed with .PK format, here I upload sample of files.

ImageImage

Image

Xiang Long Zhi Jian Archive Research
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 667 times
Contact:

Re: [Request] Xiang Long Zhi Jian

Post by aluigi »

let me know if the following works correctly:

Code: Select all

# Xiang Long Zhi Jian (script 0.1.1)
# script for QuickBMS http://quickbms.aluigi.org

math CHUNK_SIZE = 0x10000
comtype unzip_dynamic   # deflate but some files are not compressed
get DUMMY long
get FILES long
for i = 0 < FILES
    get DUMMY long
    get ZSIZE long
    get OFFSET long
    getdstring HASH 32
    savepos TMP
    goto OFFSET
    get DUMMY1 long
    get DUMMY2 long
    get DUMMY3 long
    get DUMMY4 long
    get DUMMY5 long # 0x309d4
    get DUMMY6 long # 0x2f74e
    get DUMMY7 long # 0x28
    get CHUNKS long # 0x27
    get DUMMY8 long # 0x1d4
    get DUMMY9 long # 0x30ba8 (total size)
    math OFFSET1 = OFFSET
    math OFFSET1 += DUMMY5
    math OFFSET2 = OFFSET
    math OFFSET2 += DUMMY6
    savepos OFFSET
    math SIZE = CHUNKS
    math SIZE *= CHUNK_SIZE
    putvarchr MEMORY_FILE SIZE 0
    log MEMORY_FILE 0 0
    append
    for j = 0 < CHUNKS
        goto OFFSET2
        get DUMMY1 long
        get DUMMY2 long     # 0x1a
        get DUMMY3 short    # 0x200
        get DUMMY4 short    # 0x200
        get DUMMY5 short    # 0x90
        get DUMMY6 short    # 0x70
        get DUMMY7 short    # 0x28
        get DUMMY8 short    # 0xa8
        get DUMMY9 long     # 0xa4
        get DUMMY10 long    # 0x28 (relative offset)
        get DUMMY11 long    # 0x12d9 (zsize)
        get DUMMY12 long    # 0x3f800000
        get DUMMY13 long    # 0x3f8000
        get DUMMY14 long    # 0x104
        math DUMMY7 *= 2
        getdstring DUMMY DUMMY7 # probably encoded name
        savepos OFFSET2
        clog MEMORY_FILE OFFSET DUMMY11 CHUNK_SIZE
        math OFFSET += DUMMY11
    next j
    append
    get SIZE asize MEMORY_FILE
    log "" 0 SIZE MEMORY_FILE
    goto TMP
next i
Last edited by aluigi on Wed Feb 29, 2012 5:32 pm, edited 1 time in total.
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: [Request] Xiang Long Zhi Jian

Post by CriticalError »

wow thats cool aluigi, the script begin fine, but after some seconds I get it.

Image
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 667 times
Contact:

Re: [Request] Xiang Long Zhi Jian

Post by aluigi »

ok, run quickbms from command-line with the -V option and then paste or send me via pm the last 100 lines showed or similar
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 667 times
Contact:

Re: [Request] Xiang Long Zhi Jian

Post by aluigi »

I have found no fields that state if the chunk is compressed or not so I have adopted the unzip_dynamic compression that does the job automatically, let me know if this work-around works and the files are ok
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: [Request] Xiang Long Zhi Jian

Post by CriticalError »

aluigi wrote:I have found no fields that state if the chunk is compressed or not so I have adopted the unzip_dynamic compression that does the job automatically, let me know if this work-around works and the files are ok
same here aluigi, after extract some files I get same error.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 667 times
Contact:

Re: [Request] Xiang Long Zhi Jian

Post by aluigi »

in this case I don't know what to say because unzip_dynamic has been written just to avoid the zlib errors
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: [Request] Xiang Long Zhi Jian

Post by CriticalError »

ahh I forget paste new script, I use old one, sorry for mistakes, now it worked.
Post Reply