08-19-2018, 04:14 AM
Bam, here you go!
Even did what Raccoon Sam suggested and replaced the decryption info with an IEND terminator (since the official specification says it's required and some programs may look for it). Works with all the supplied files so hopefully it does for all of them!
Code:
# Pocket All-Star .png format
#
# Written by puggsoy (with help from Raccon Sam)
# script for QuickBMS http://quickbms.aluigi.org
endian big
goto -0xC
get ZERO long
get HEADSZ long
get KEY long
math KEY -= 0x800 # not sure why it's 0x800 larger than it needs to be
goto 0
get FILESIZE asize
putvarchr MEMORY_FILE FILESIZE 0
log MEMORY_FILE 0 0
filexor KEY
log MEMORY_FILE 0 HEADSZ
filexor 0
append
set TAILSZ FILESIZE
math TAILSZ -= HEADSZ
log MEMORY_FILE HEADSZ TAILSZ
putvarchr MEMORY_FILE -0xC 0x00000000 long
putvarchr MEMORY_FILE -0x8 0x49454E44 long
putvarchr MEMORY_FILE -0x4 0xAE426082 long
append 1
get SIZE asize MEMORY_FILE
get NAME basename
string NAME += ".png"
log NAME 0 SIZE MEMORY_FILE
Even did what Raccoon Sam suggested and replaced the decryption info with an IEND terminator (since the official specification says it's required and some programs may look for it). Works with all the supplied files so hopefully it does for all of them!