Advertisement
Bond697

Untitled

Dec 29th, 2012
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <io.h>
  3. #include <fcntl.h>
  4. #include <sys\stat.h>
  5. #include <conio.h>
  6. #include <windows.h>
  7. #include <stdlib.h>
  8. #include <shellapi.h>
  9.  
  10. int main() {
  11.  
  12.     unsigned char target[10] = {0x05,0x21,0x00,0x2E,0x00,0xD1,0x07,0x21,0x04,0x48};
  13.     //unsigned char target[2] = {0x10, 0x58};
  14.  
  15.     int f;
  16.     char buf[MAX_PATH];
  17.     unsigned char *data = new unsigned char[1024 * 1024 * 4];
  18.  
  19.     for (int a = 0;a < 344;++a) {
  20.         sprintf(buf,"-d overlay_%04i.bin",a);
  21.  
  22.         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);
  23.         /*
  24.         f = _open(buf,_O_BINARY | _O_RDONLY,_S_IREAD);
  25.         int size = _filelength(f);
  26.         _read(f,data,size);
  27.         _close(f);
  28.  
  29.         size -= 9;
  30.         //size -= 1;
  31.         for (int p = 0;p < size;++p) {
  32.             if (!memcmp(&data[p],target,10)) {
  33.                 puts(buf);
  34.                 //break;
  35.             }
  36.         }
  37.    
  38.     */
  39.     }
  40.  
  41.  
  42.  
  43.     puts("\nDone");
  44.     //_getch();
  45.     while(1);
  46.  
  47.     return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement