the amazing spider-man 2 pkz file?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
hexG0d18
Posts: 54
Joined: Mon Aug 29, 2016 2:20 pm

the amazing spider-man 2 pkz file?

Post by hexG0d18 »

https://mega.nz/#!pjRjmToB!fP_aZuUrs3X5 ... 1tUe4t6I8s . please help. thanks you. Good morning. 8-)
Doprond
Posts: 67
Joined: Tue Mar 15, 2016 3:38 pm

Re: the amazing spider-man 2 pkz file?

Post by Doprond »

Try this

Code: Select all

# decompresses the *.pkz files from The Amazing Spider-Man (PC)
# no extraction of individual files at the moment (TOC offsets don't fit)
# (c) 2012-10-09 by AlphaTwentyThree of XeNTaX

comtype zlib_noerror
get IDENT long
if IDENT == 0xb0b1bEbA
   endian big
elif IDENT == 0xbabeb1b0
else
   cleanexit
endif
get DATA_OFF long              # start of compressed data
get NAME basename
string NAME += ".header"
log NAME 0 DATA_OFF            # write header to disk for later research
get BLOCKSIZE long             # length of one zlib block
get LOOPS asize                # calculate the number of loops
math LOOPS -= DATA_OFF
math LOOPS /= BLOCKSIZE
# memory pre-allocation
get SIZE asize
math SIZE -= DATA_OFF
math SIZE *= 10
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
set OFFSET DATA_OFF  # initialize first offset
set SIZE BLOCKSIZE
math SIZE *= 10      # set decompressed size to some default
append
for i = 1 <= LOOPS
   clog MEMORY_FILE OFFSET BLOCKSIZE SIZE # decompress block to memory
   math OFFSET += BLOCKSIZE               # jump to next block
next i
append
get NAME basename
string NAME += ".decomp"
get SIZE asize MEMORY_FILE
log NAME 0 SIZE MEMORY_FILE

P.S This is decompressor,not really useful if you want extract some contents of .pkz file