Saints Row 3 Switch vpp_nx64

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
masagrator
Posts: 82
Joined: Sat Dec 22, 2018 10:03 am

Saints Row 3 Switch vpp_nx64

Post by masagrator »

It looks like PC tools and bms script are not 100% compatible with Switch archives (it can only read name of first file).
Uploaded one of archives.

Can someone check what needs to be modified?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Saints Row 3 Switch vpp_nx64

Post by aluigi »

It's not so simple because:
- OFFSET and ZSIZE fields (probably SIZE too) aren't exact, it's necessary to make some math operations on them
- it's not a correct zlib compression

Currently I leave here my work-in-progress script in case someone has more information:

Code: Select all

goto 0x154
get FILES long
get ARCHIVE_SIZE long
get INFO_SIZE long
get NAMES_SIZE long
get DUMMY long
get DATA_SIZE long
padding 0x800
savepos INFO_OFF
xmath NAMES_OFF "INFO_OFF + INFO_SIZE"
math NAMES_OFF x 0x800
xmath BASE_OFF  "NAMES_OFF + NAMES_SIZE"
math BASE_OFF x 0x800
for i = 0 < FILES
    get NAME_OFF long
    get ZERO long
    get ZERO long
    get OFFSET long
    get SIZE long
    get ZSIZE long
    get ZERO long
    get ZERO long

    savepos TMP
    math NAME_OFF + NAMES_OFF
    goto NAME_OFF
    get NAME string
    goto TMP

    math ZSIZE + 5  # necessary but doesn't have sense...

    math OFFSET >> 2
    math OFFSET + BASE_OFF
    clog NAME OFFSET ZSIZE SIZE
next i