• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Creating Pictures to Snaphsots

illinialex24

Smash Hero
Joined
May 23, 2008
Messages
7,489
Location
Discovered: Sending Napalm
What does Comex mean when he said this:

So guys... guess what I found (with the help of crediar and a lot of other people)

To calculate the checksum of a decrypted replay/snapshot/stage, take the number at 0x1c (big-endian). Add 0x20 to that and take that much of the file from the beginning (should be most of the file, except for null bytes at the end for padding). Then, replace the four bytes at 0x10 with 0xDEADBEEF. crc32 and stick the result (again, big-endian) into 0x10.


Here is a quick Python script to do that:
import sys, struct, zlib
from UserString import MutableString
N = False
if len(sys.argv) == 4 and sys.argv[1] == '-n':
N = True
sys.argv = sys.argv[1:]
if len(sys.argv) != 3:
print 'Usage: brawl-cksum [-n] <input> <output>'
print 'If -n, I won\'t modify the size to 0'
sys.exit(1)
f = open(sys.argv[1], 'r')
g = f.read()
f.close()
n = MutableString(g)
if not N: n[0x1c:0x20] = struct.pack('>I', 0) # Set the size to 0, it doesn't care if it's compressed
size = struct.unpack('>I', str(n[0x1c:0x20]))[0] + 0x20
m = MutableString(n[:size])
m[0x10:0x14] = struct.pack('>I', 0xDEADBEEF)
n[0x10:0x14] = struct.pack('>I', zlib.crc32(str(m)))
f = open(sys.argv[2], 'w')
f.write(str(n))
f.close()

so,
1. Decrypt the file using the sd-key (AB 01 B9...) and the brawl specific IV (4E 03 41...).
2. Run DeLZSS on it
3. Change the 4 bytes at 0x1c to be the same as the bytes as the 4 bytes at 0x18.
4. Run ^ with -n
5. Encrypt

and you can use the modified file. Warning, a lot of stuff (like having no tiles) causes Brawl to crash.

Really this should be a lot easier than using the USBGecko to mess with stuff...
I think you can already create your own snapshot, how do you do so???? I need 3 snapshots at least...
 
Top Bottom