#include #include #include #include #include #include #include #include int main() { unsigned char target[10] = {0x05,0x21,0x00,0x2E,0x00,0xD1,0x07,0x21,0x04,0x48}; //unsigned char target[2] = {0x10, 0x58}; int f; char buf[MAX_PATH]; unsigned char *data = new unsigned char[1024 * 1024 * 4]; for (int a = 0;a < 344;++a) { sprintf(buf,"-d overlay_%04i.bin",a); ShellExecute(0, "open", "E:\\Games\\NDS\\DS Software\\Hacking Tools\\Nintendo_DS_Compressors-CUE\\blz.exe", buf, "C:\\Users\\mat.DONARUMO\\Desktop\\Research\\Game Files\\BW2\\Pokemon White 2(E)\\overlay\\", 0); /* f = _open(buf,_O_BINARY | _O_RDONLY,_S_IREAD); int size = _filelength(f); _read(f,data,size); _close(f); size -= 9; //size -= 1; for (int p = 0;p < size;++p) { if (!memcmp(&data[p],target,10)) { puts(buf); //break; } } */ } puts("\nDone"); //_getch(); while(1); return 0; }