Bond697 icon

ovl

Bond697 | PRO | 06/29/12 03:41:58 AM UTC | 0 ⭐ | 631 👁️ | Never ⏰ | []
C++ |

780 B

|

None

|

0 👍

/

0 👎

#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys\stat.h>
#include <conio.h>
#include <windows.h>
 
 
int main() {
 
    //unsigned char target[64] = {};
    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,"C:\\Users\\mat.DONARUMO\\Desktop\\Research\\Game Files\\BW2\\Pokemon White 2(J)\\overlay\\overlay9_%04i.bin",a);
        f = _open(buf,_O_BINARY | _O_RDONLY,_S_IREAD);
        int size = _filelength(f);
        _read(f,data,size);
        _close(f);
 
        //size -= 63;
        size -= 1;
        for (int p = 0;p < size;++p) {
            if (!memcmp(&data[p],target,2)) {
                puts(buf);
                //break;
            }
        }
    }
 
    puts("\nDone");
    //_getch();
    while(1);
 
    return 0;
}

Comments