Page 1 of 1

Help to decrompress .pak archive mystery mountains

Posted: Wed Aug 17, 2011 7:39 pm
by danny
Hi friends, i need help with the decompress the file xml.pak
the game is Mystery stories mountains of madness
the file

http://www.mediafire.com/?asxus8j56cws66i

Re: Help to decrompress .pak archive mystery mountains

Posted: Tue Oct 04, 2011 1:44 pm
by fordisi

Re: Help to decrompress .pak archive mystery mountains

Posted: Sun Dec 18, 2011 12:34 am
by Marry
The contents of this post was deleted because of possible forum rules violation.

Re: Help to decrompress .pak archive mystery mountains

Posted: Sun Dec 18, 2011 12:47 pm
by aluigi
job done, it was a simple encryption scheme:

Code: Select all

# Mystery Stories: Mountains of Madness
# script for QuickBMS http://quickbms.aluigi.org

idstring "gfcpk"
get VER byte
getdstring KEY 4
get DUMMY long

get SIZE asize
log MEMORY_FILE 0 SIZE

print "wait some seconds/minutes for the decryption..."
savepos OFFSET
for i = OFFSET < SIZE
    getvarchr T MEMORY_FILE i
    math C = i
    math X = i
    math X &= 3
    getvarchr X KEY X
    math C ^= X
    math T ^= C
    putvarchr MEMORY_FILE i T
next i

print "extraction..."
goto OFFSET MEMORY_FILE
get FILES long MEMORY_FILE
for i = 0 < FILES
    get NAMESZ long MEMORY_FILE
    getdstring NAME NAMESZ MEMORY_FILE
    get ZIP long MEMORY_FILE
    get SIZE long MEMORY_FILE
    get OFFSET long MEMORY_FILE
    get ZSIZE long MEMORY_FILE
    if ZIP == 0
        log NAME OFFSET SIZE MEMORY_FILE
    else
        clog NAME OFFSET ZSIZE SIZE MEMORY_FILE
    endif
next i

Re: Help to decrompress .pak archive mystery mountains

Posted: Sun Dec 18, 2011 6:26 pm
by Marry
Thank you very much, Luigi :up: