1
0
mirror of synced 2024-11-14 23:07:36 +01:00

5dx inject dll

This commit is contained in:
ghkkk090 2022-10-11 09:01:48 +07:00
parent f2d6a91f90
commit 632780e04f
2 changed files with 5 additions and 27 deletions

View File

@ -173,31 +173,6 @@ static int writeLog(std::string filename, std::string message)
}
}
// writeDump(filename: Char*, data: unsigned char *, size: size_t): Int
static int writeDump(char* filename, unsigned char* data, size_t size)
{
// Open the file with the provided filename
FILE* file = fopen(filename, "wb");
// File opened successfully
if (file)
{
// Write the data to the file
fwrite((void*)data, 1, size, file);
// Close the file
fclose(file);
// Return success status
return 0;
}
else // Failed to open
{
// Return failure status
return 1;
}
}
static int ReturnTrue()
{
return 1;
@ -314,9 +289,11 @@ static InitFunction Wmmt5Func([]()
//load banapass emu
LoadLibraryA(".\\openBanaW5p.dll");
// disable assert errors
uintptr_t wassertPtr = (*(uintptr_t*)(imageBase + 0xc840c0));
safeJMP(wassertPtr, ReturnTrue);
injector::WriteMemory<uint8_t>(hook::get_pattern("0F 94 C0 84 C0 0F 94 C0 84 C0 75 05 45 32 ? EB", 0x13), 0, true);
injector::MakeNOP(hook::get_pattern("83 C0 FD 83 F8 01 0F 87 B4 00 00 00", 6), 6);
// Skip weird camera init that stucks entire pc on certain brands. TESTED ONLY ON 05!!!!

View File

@ -894,7 +894,8 @@ static InitFunction Wmmt5DXFunc([]()
MH_CreateHookApi(L"hasp_windows_x64_98199.dll", "hasp_login", Hook_hasp_login, NULL);
MH_CreateHookApi(L"WS2_32", "bind", Hook_bind, reinterpret_cast<LPVOID*>(&pbind));
//load banapass emu
LoadLibraryA(".\\openBanaW5p.dll");
GenerateDongleData(isTerminal);