Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "spider.h"
- int payload (){
- unsigned int addr = 0x17990000;
- void *this = 0x08F10000;
- int *read_len = 0x08F10020;
- int *buf = 0x18410000;
- int pkData[0x3A];
- unsigned int offset = 0;
- int i;
- IFopen(this, L"dmc:/pokemon.bin", 0x1);
- IFseek(this, 0);
- IFread(this, read_len, buf, 0xE8);
- svcSleepThread(0x400000LL);
- memcpy(pkData, buf, 0xE8);
- GSPGPU_FlushDataCache(addr, 0x10000);
- GX_SetTextureCopy(addr, buf, 0x10000, 0, 0, 0, 0, 8);
- GSPGPU_FlushDataCache(buf, 0x10000);
- for (i = 0; i < 0x4000; i++){
- if ((buf[i] == 0x00720071) && (buf[i + 1] == 0x0065006D)) offset = i+0x540;
- }
- if (offset != 0){
- svcSleepThread(0x400000LL);
- memcpy(buf + offset, pkData, 0xE8);
- }
- svcSleepThread(0x400000LL);
- GSPGPU_FlushDataCache(buf, 0x10000);
- GX_SetTextureCopy(buf, addr, 0x10000, 0, 0, 0, 0, 8);
- GSPGPU_FlushDataCache(addr, 0x10000);
- svcSleepThread(0x400000LL);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement