Trainer Search

firas724

New Member
Joined
Mar 27, 2015
Messages
3
Reaction score
0
Hi guys, I recently was interested in modding Castle storm and play around with the stats and game rules, I managed to decompress it using quickBMS, first using this code to unpack the .pxp

Code:

# Extracts the compressed resources from the .PXP
# file but does NOT decompress them
idstring "PX"
get DUMMY short
get INFO_SIZE long
get DATA_OFFSET long
get FILES long
get DUMMY long
for i = 0 < FILES
get OFFSET long
get SIZE long
get TYPE byte
get NAMESZ byte
getdstring NAME NAMESZ
padding 4
get ZSIZE long
log NAME OFFSET ZSIZE
next i


Then I used this code to decompress the files the were in .pxp

Code:

# Zen Studios .PXP file decompresser
# (CastleStorm, Pinball FX2)
# Adrian Dale 09/10/2013
#
# Needs NeoWizLib.dll provided by Ekey
# http://forum.xentax.com/viewtopic.php?f=10&t=10654
#
# This script decompresses a single resource file that has previously
# been extracted from a .PXP file.
# This has been tested with files from Pinball FX2 and appears to
# successfully decompress most of the files in the archives.
log MEMORY_FILE3 0 0

do
get CHUNKTYPE byte
If CHUNKTYPE == 0x03
get ZSIZE threebyte
SavePos IN_OFFSET
set SIZE long 0x80000
#print "%CHUNKTYPE% %ZSIZE|hex% %SIZE|hex% %IN_OFFSET|hex%\n"
log MEMORY_FILE IN_OFFSET ZSIZE
putvarchr MEMORY_FILE2 SIZE 0
CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE

math IN_OFFSET + ZSIZE
goto IN_OFFSET

ElseIf CHUNKTYPE == 0x04
get SIZE threebyte
get ZSIZE threebyte
SavePos IN_OFFSET
#print "%CHUNKTYPE% %SIZE% %ZSIZE|hex% %IN_OFFSET|hex%\n"
log MEMORY_FILE IN_OFFSET ZSIZE
putvarchr MEMORY_FILE2 SIZE 0
CallDLL NeoWizLib.dll NWDecompress stdcall "" MEMORY_FILE MEMORY_FILE2 SIZE
Endif

# Now tag MEMORY_FILE2, which is the decompressed chunk
# onto the end of MEMORY_FILE3
append
log MEMORY_FILE3 0 SIZE MEMORY_FILE2
append

while CHUNKTYPE != 0x04

get NAME basename
get EXT extension
string NAME += "_unpacked."
string NAME += EXT

get FULL_SIZE asize MEMORY_FILE3
log NAME 0 FULL_SIZE MEMORY_FILE3


Until now I have only decompressed the .cfg , and modified the contents, then tried to pack it again into .pxp, by just packing it into a different extension then renaming it,but ultimately failed. I really would appreciate it if someone would give me a way of re-compressing the .cfg into its original form, and packing it into the original extension settings.
Here is a file that I was trying this on ( with the .dll). http://www.mediafire.com/download/zw6nyrb8nh0p1d9/CastleStorm.rar
 
Top