/* by Luigi Auriemma used in the games of SexGameDevil */ static unsigned char un434a_dump[] = "\x55\x8b\xec\x83\xc4\xf4\xfc\x53\x57\x56\x8b\x74\x24\x20\x8b\x7c" "\x24\x24\x66\x81\x3e\x4a\x43\x0f\x85\xa8\x02\x00\x00\x83\xc6\x0a" "\x33\xdb\xba\x00\x00\x00\x80\xc7\x44\x24\x14\x08\x00\x00\x00\x43" "\x8d\xa4\x24\x00\x00\x00\x00\x05\x00\x00\x00\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x73\x2c\x8b\x4c\x24\x10\x33\xc0" "\x8d\xa4\x24\x00\x00\x00\x00\x05\x00\x00\x00\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x02\x44\x24" "\x0c\x88\x07\x47\xeb\xc6\x03\xd2\x75\x08\x8b\x16\x83\xc6\x04\xf9" "\x13\xd2\x0f\x82\x6e\x01\x00\x00\x03\xd2\x75\x08\x8b\x16\x83\xc6" "\x04\xf9\x13\xd2\x0f\x83\xdc\x00\x00\x00\xb9\x04\x00\x00\x00\x33" "\xc0\x8d\xa4\x24\x00\x00\x00\x00\x8d\x64\x24\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x48\x74\xb1" "\x0f\x89\xef\x01\x00\x00\x03\xd2\x75\x08\x8b\x16\x83\xc6\x04\xf9" "\x13\xd2\x73\x42\xbd\x00\x01\x00\x00\xb9\x08\x00\x00\x00\x33\xc0" "\x8d\xa4\x24\x00\x00\x00\x00\x05\x00\x00\x00\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x88\x07\x47" "\x4d\x75\xd6\x03\xd2\x75\x08\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x72" "\xc3\xe9\x26\xff\xff\xff\xb9\x01\x00\x00\x00\x33\xc0\x8d\xa4\x24" "\x00\x00\x00\x00\x8d\xa4\x24\x00\x00\x00\x00\x90\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x83\xc0\x07" "\x89\x44\x24\x10\xc6\x44\x24\x0c\x00\x83\xf8\x08\x0f\x84\xea\xfe" "\xff\xff\xb9\x08\x00\x00\x00\x33\xc0\x8d\x49\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x88\x44\x24" "\x0c\xe9\xc6\xfe\xff\xff\xb9\x07\x00\x00\x00\x33\xc0\x8d\xa4\x24" "\x00\x00\x00\x00\x8d\xa4\x24\x00\x00\x00\x00\x90\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x8b\xe8\xb9" "\x02\x00\x00\x00\x33\xc0\x8d\x9b\x00\x00\x00\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x8b\xc8\x8b" "\xc5\x83\xc1\x02\x85\xc0\x74\x07\x8b\xd8\xe9\xe7\x00\x00\x00\x83" "\xf9\x02\x0f\x84\xed\x00\x00\x00\x41\x33\xc0\x90\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x89\x44\x24" "\x14\xe9\x46\xfe\xff\xff\xb9\x01\x00\x00\x00\x90\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc9\x03\xd2\x75\x08\x8b\x16" "\x83\xc6\x04\xf9\x13\xd2\x72\xe4\x49\x49\x75\x31\x8b\xc3\xb9\x01" "\x00\x00\x00\x8d\xa4\x24\x00\x00\x00\x00\x8b\xff\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc9\x03\xd2\x75\x08\x8b\x16" "\x83\xc6\x04\xf9\x13\xd2\x72\xe4\xe9\x69\x00\x00\x00\x49\x8b\xc1" "\x8b\x4c\x24\x14\x8b\xe8\x33\xc0\xd3\xe5\x33\xc0\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc0\x49\x75\xef\x0b\xc5\x8b" "\xd8\xb9\x01\x00\x00\x00\x8d\x9b\x00\x00\x00\x00\x03\xd2\x75\x08" "\x8b\x16\x83\xc6\x04\xf9\x13\xd2\x13\xc9\x03\xd2\x75\x08\x8b\x16" "\x83\xc6\x04\xf9\x13\xd2\x72\xe4\x3d\x00\x00\x01\x00\x73\x14\x3d" "\xff\x37\x00\x00\x73\x0e\x3d\x7f\x02\x00\x00\x73\x08\x83\xf8\x7f" "\x77\x04\x41\x41\x41\x41\x8b\xee\x8b\xf7\x2b\xf0\xf3\xa4\x8b\xf5" "\xe9\x77\xfd\xff\xff\x8d\x6c\x24\x18\x8b\x74\x24\x20\x83\x7e\x06" "\x00\x74\x4e\x8b\x4e\x02\x8b\x74\x24\x24\x33\xc0\x83\xf9\x04\x72" "\x33\x8d\xa4\x24\x00\x00\x00\x00\x8d\x64\x24\x00\x8b\x1e\x03\xc3" "\xd1\xe3\x83\xd3\x01\x33\xc3\x83\xc6\x04\x83\xe9\x04\x74\x15\x83" "\xf9\x04\x73\xe8\xba\x04\x00\x00\x00\x2b\xd1\x2b\xf2\xb9\x04\x00" "\x00\x00\xeb\xd8\x8b\x74\x24\x20\x3b\x46\x06\x74\x04\x33\xc0\xeb" "\x06\x8b\xc7\x2b\x44\x24\x24\x5e\x5f\x5b\xc9\xc2\x08\x00"; int (* __stdcall un434a)(unsigned char *src, unsigned char *dst) = NULL; // anti DEP limitation! if you apply VirtualAlloc on a static char // it will cover also the rest of the page included other variables! void *un434a_alloc(u8 *dump, int dumpsz) { int pagesz; void *ret; pagesz = (dumpsz + 4095) & (~4095); // useful for pages? mah #ifdef WIN32 ret = VirtualAlloc( NULL, pagesz, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); // write for memcpy #else ret = malloc(pagesz); mprotect( ret, pagesz, PROT_EXEC | PROT_WRITE); // write for memcpy #endif memcpy(ret, dump, dumpsz); return(ret); } void un434a_init(void) { if(un434a) return; un434a = un434a_alloc(un434a_dump, sizeof(un434a_dump)); }