Swordman (笑傲江湖OL)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
CriticalError
Posts: 204
Joined: Thu Aug 14, 2014 8:52 pm

Swordman (笑傲江湖OL)

Post by CriticalError »

Image

Hello guys, well my reques is not to much because I have unpacker for this game, but the problem is models.pck no work, it give me error when try unpack, so I upload a source of unpacker so maybe can check it, I got a error say this.

PS: I know files can be unpacked with offzip, but offzip unpack all with random names and all in one folder and really format is tottaly different don't know why, this unpacker got all with native format, like:

DDS=Texture
SKI=3D Model
SKT=ANIMATION
BON=BONES

D:\Swordsman\package>java -jar xapck.jar x models.pck
xiaoAo pack util version 2014.4.29
PCK: models.pck
Mode: extract
Files: 75323
Please...wait
Exception in thread "main" java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Unknown Source)
at com.pakage.unPak(pakage.java:70)
at pak.main(pak.java:22)


Web: http://xa.wanmei.com/
Download: http://xa.wanmei.com/download/

Source Unpacker

http://puu.sh/b536d/411b224460.7z

Samples

http://puu.sh/b53L9/1064cac82d.7z
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Swordman (笑傲江湖OL)

Post by aluigi »

I bet the problem is the usage of signed integer (max 2gb) because models.pck is the only archive bigger than 2gb.
CriticalError
Posts: 204
Joined: Thu Aug 14, 2014 8:52 pm

Re: Swordman (笑傲江湖OL)

Post by CriticalError »

aluigi wrote:I bet the problem is the usage of signed integer (max 2gb) because models.pck is the only archive bigger than 2gb.
ummm but you can try the source unpacker for modify it? I check it myself and see seeks there, but really no idea what modify :S
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Swordman (笑傲江湖OL)

Post by aluigi »

Unfortunately Java is not my language so I prefer to make no small changes that then may take me hours to debug.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Swordman (笑傲江湖OL)

Post by Ekey »

Long for java data type is a 64-bit signed two's complement integer. Dunno what the problem.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Swordman (笑傲江湖OL)

Post by aluigi »

The format is quite simple so for the extraction it's possible to try a simple script, check this one:

Code: Select all

comtype unzip_dynamic
goto -8
get FILES long
goto -276
get INFO_OFF long
math INFO_OFF ^= 0x33C3EDDB
goto INFO_OFF
for i = 0 < FILES
    get HEAD long
    math HEAD ^= 0x62A4F9E1
    get FOOT long
    math FOOT ^= 0x3520C3D5
    savepos INFO_OFF
    clog MEMORY_FILE INFO_OFF HEAD 0x118
    math INFO_OFF += HEAD
    goto INFO_OFF

    getdstring NAME 260 MEMORY_FILE
    get OFFSET longlong  MEMORY_FILE
    get SIZE long MEMORY_FILE
    get ZSIZE long MEMORY_FILE
    if ZSIZE == SIZE
        log NAME OFFSET SIZE
    else
        clog NAME OFFSET ZSIZE SIZE
    endif
next i
CriticalError
Posts: 204
Joined: Thu Aug 14, 2014 8:52 pm

Re: Swordman (笑傲江湖OL)

Post by CriticalError »

omg many thanks aluigi and Ekey, really gratefull for your help, wonderfull, keep working mate.