X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=savezelda.git;a=blobdiff_plain;f=lsw%2Fhead.s;fp=lsw%2Fhead.s;h=6670b80f17af0223b609448268399c84e52a2d6d;hp=0000000000000000000000000000000000000000;hb=c58aa93d1e9265ff6be3a64d05cd01697ed0a656;hpb=da886e2a723e5990d209d8fc141dc9bab7bf0424 diff --git a/lsw/head.s b/lsw/head.s new file mode 100644 index 0000000..6670b80 --- /dev/null +++ b/lsw/head.s @@ -0,0 +1,43 @@ +# Copyright 2011 roto +# This code is licensed to you under the terms of the GNU GPL, version 2; +# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt + + bptr = 0x91178ea0 + +0: + # Part of the savefile + .long 0x00000001, 0x00000000, 0x00000000, 0x00000000 + .long 0x00000000, 0x00000013, 0x0000000d, 0x00000000 + .long 0x00000002, 0x00000000, 0x000007db, 0x00000000 + .long 0x00000001, 0x0000029e, 0x0000019d, 0x00050000 + .long 0x01010008, 0x060a0100, 0x00000001, 0x00000000 + .long 0x00000000, 0x00000000, 0x00000000, 0x00000000 + + # Filler + .fill 0xF60 - (. - 0b) + +exploitv2: + # This is necessary for the 2nd exploit (first release) of LSW + .include "exploit2.s" + + # More filler + .fill 0x7860 - (. - 0b) + + # Insert rest of the save + .incbin "head.b" + + # Smack the stack. + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111, 0x11111111, 0x11111111, 0x11111111 + .long 0x11111111 + + # Depending on the version we jump now to exploit.s or to "exploit2v:" + .long 0x11111111, bptr, 0x11111111, 0x11111111 + + .fill 0x10000 - (. - 0b)