Re: Arbitrary code execution in Red/Blue using the "8F" item
Posted by: Aldrasio
Date: 2018-02-28 12:32:40
[li]Carbos x[XX][/li]
[li]X Accuracy x[YY][/li]
[li]Lemonade x[AA][/li]
[li]Water Stone x04[/li]
[li]Max Revive x[BB][/li]
[li]TM01 xany[/li]
ld h, [XX]
ld l, [YY]
ld a, [AA]
ld (hl+), a
inc b ; padding
ld (hl), [BB]
ret
As an example, you can make the first Pokemon in your current box shiny by loading 0xFAAA into 0xDAB1, which would correspond to:
[li]XX = 0xDA = 218[/li]
[li]YY = 0xB1 = 177[/li]
[li]AA = 0xFA = 250[/li]
[li]BB = 0xAA = 170[/li]
And so the inventory would be:
[li]Carbos x218[/li]
[li]X Accuracy x177[/li]
[li]Lemonade x250[/li]
[li]Water Stone x04[/li]
[li]Max Revive x170[/li]
[li]TM01 xany[/li]