From 632780e04f51ee3f39a9a639ee3a3320661188db Mon Sep 17 00:00:00 2001 From: ghkkk090 Date: Tue, 11 Oct 2022 09:01:48 +0700 Subject: [PATCH] 5dx inject dll --- OpenParrot/src/Functions/Games/ES3X/WMMT5.cpp | 29 ++----------------- .../src/Functions/Games/ES3X/WMMT5DX.cpp | 3 +- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/OpenParrot/src/Functions/Games/ES3X/WMMT5.cpp b/OpenParrot/src/Functions/Games/ES3X/WMMT5.cpp index 68f29ed..270cda8 100644 --- a/OpenParrot/src/Functions/Games/ES3X/WMMT5.cpp +++ b/OpenParrot/src/Functions/Games/ES3X/WMMT5.cpp @@ -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(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!!!! diff --git a/OpenParrot/src/Functions/Games/ES3X/WMMT5DX.cpp b/OpenParrot/src/Functions/Games/ES3X/WMMT5DX.cpp index 9a31072..7034f95 100644 --- a/OpenParrot/src/Functions/Games/ES3X/WMMT5DX.cpp +++ b/OpenParrot/src/Functions/Games/ES3X/WMMT5DX.cpp @@ -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(&pbind)); - + //load banapass emu + LoadLibraryA(".\\openBanaW5p.dll"); GenerateDongleData(isTerminal);