Journey to the West [package.was]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
KumonMa
Posts: 4
Joined: Sat Jul 28, 2018 2:23 pm

Journey to the West [package.was]

Post by KumonMa »

I want to modify the text in the package, how do I want to do it?

https://mega.nz/#F!OzxUEICT!Tk8_BA5sT4vXkCHURej-0A
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Journey to the West [package.was]

Post by aluigi »

I don't know what's the compression algorithm used but I suspect there may be some encryption involved (didn't test the compression scanner, just supposing).

Anyway the format is simple so I leave the work-in-progress script here, that means YOU MUST NOT USE IT:

Code: Select all

comtype ???
get DUMMY long
get ZERO long
get DUMMY long
get DUMMY long  # 1
get DUMMY long
get DUMMY long
get FILES long
get DUMMY long
for i = 0 < FILES
    get ENTRY_OFF long
    get ZSIZE long
    get SIZE long
    get ZIP long
    get DUMMY long
    get ZERO long
    get ENTRY_SIZE long
    get NAMESZ long
    math NAMESZ + 1
    getdstring NAME NAMESZ
    savepos OFFSET
    if ZIP == 0
        log NAME OFFSET SIZE
    else
        get SIZE long
        math OFFSET + 4
        math ZSIZE  - 4
        clog NAME OFFSET ZSIZE SIZE
    endif
    math ENTRY_OFF + ENTRY_SIZE
    goto ENTRY_OFF
next i
KumonMa
Posts: 4
Joined: Sat Jul 28, 2018 2:23 pm

Re: Journey to the West [package.was]

Post by KumonMa »

aluigi wrote:I don't know what's the compression algorithm used but I suspect there may be some encryption involved (didn't test the compression scanner, just supposing).

Anyway the format is simple so I leave the work-in-progress script here, that means YOU MUST NOT USE IT:

Code: Select all

comtype ???
get DUMMY long
get ZERO long
get DUMMY long
get DUMMY long  # 1
get DUMMY long
get DUMMY long
get FILES long
get DUMMY long
for i = 0 < FILES
    get ENTRY_OFF long
    get ZSIZE long
    get SIZE long
    get ZIP long
    get DUMMY long
    get ZERO long
    get ENTRY_SIZE long
    get NAMESZ long
    math NAMESZ + 1
    getdstring NAME NAMESZ
    savepos OFFSET
    if ZIP == 0
        log NAME OFFSET SIZE
    else
        get SIZE long
        math OFFSET + 4
        math ZSIZE  - 4
        clog NAME OFFSET ZSIZE SIZE
    endif
    math ENTRY_OFF + ENTRY_SIZE
    goto ENTRY_OFF
next i



Yes, it seems to use xxtea, but I tried to decrypt one of the files and got an error.

https://mega.nz/#F!evZmSQKY!tPZoS-nro_Pv0UGbYGpCHA
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Journey to the West [package.was]

Post by aluigi »

No, that script is for something completely different.