LEGO Batman^H^H^Hhaxx
[savezelda.git] / batman / head.s
1 # Copyright      2011  Bernhard Urban <lewurm@gmail.com>
2 # This code is licensed to you under the terms of the GNU GPL, version 2;
3 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
4
5         .section ".start", "ax"
6         retadr = 0x90394140
7 0:
8         # stolen from some savegame found in teh intertube
9         .incbin "head.b"
10
11         # give the char a name
12         .ascii "you won't see this  " # len = 0x14
13
14         # smash it \o/ 0x1f0+0x4 bytes all in all...
15         .fill (0xf4/4), 4, 0x11111111
16
17         # unlock the character (somewhere here actually...)
18         .fill (0x10/4), 4, 0x90c10104
19
20         # add more padding...
21         .fill (0xdc/4), 4, 0x11111111
22
23         # now we at the actual vuln return address
24         # just point to the loader of the loader (= content of exploit.s)
25         .long retadr
26
27         # alternatively you can put the code here too and jump into the stack,
28         # however then you have to take care for nullbytes in the resulting
29         # bytecode, which is a way too tedious. so we just take the further slot for
30         # it :-) (LEGO devs are nice ppl, heh)
31
32         .fill 0x10000 - (. - 0b)