Users browsing this thread: 1 Guest(s)
Compressed PNG files?
#6
Bam, here you go!

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!
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply


Messages In This Thread
Compressed PNG files? - by shadowman44 - 08-15-2018, 06:32 PM
RE: Compressed PNG files? - by Raccoon Sam - 08-16-2018, 01:24 AM
RE: Compressed PNG files? - by craftersshaft - 08-16-2018, 08:21 PM
RE: Compressed PNG files? - by puggsoy - 08-19-2018, 12:19 AM
RE: Compressed PNG files? - by Raccoon Sam - 08-19-2018, 03:14 AM
RE: Compressed PNG files? - by puggsoy - 08-19-2018, 04:14 AM

Forum Jump: