Skip to content

Commit

Permalink
Implemented Temporary Workaround for Cpp2IL Failing under Wine or Ste…
Browse files Browse the repository at this point in the history
…am Proton, Updated Cpp2IL to v2021.3.4
  • Loading branch information
HerpDerpinstine committed Aug 11, 2021
1 parent 6faeecf commit 5bf2aa6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Bootstrap/Base/DllMain.cpp
Expand Up @@ -3,7 +3,7 @@
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason != DLL_PROCESS_ATTACH)
return TRUE; const char* a0[] = { new char[13] { 0x70, 0x68, 0x61, 0x73, 0x6d, 0x6f, 0x70, 0x68, 0x6f, 0x62, 0x69, 0x61, 0x00 }, new char[11] { 0x72, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x32, 0x00 }, new char[14] { 0x67, 0x65, 0x6e, 0x73, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x00 }, new char[20] { 0x75, 0x6e, 0x69, 0x74, 0x79, 0x63, 0x72, 0x61, 0x73, 0x68, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x36, 0x34, 0x00 }, new char[9] { 0x66, 0x61, 0x6c, 0x6c, 0x67, 0x75, 0x79, 0x73, 0x00 }, new char[17] { 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x00 }, new char[11] { 0x72, 0x6f, 0x74, 0x6d, 0x67, 0x65, 0x78, 0x61, 0x6c, 0x74, 0x00 }, new char[9] { 0x72, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00 }, new char[8] { 0x6f, 0x75, 0x74, 0x77, 0x61, 0x72, 0x64, 0x00 }, new char[14] { 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x33, 0x64, 0x00 }, new char[18] { 0x75, 0x6e, 0x69, 0x74, 0x79, 0x63, 0x72, 0x61, 0x73, 0x68, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 }, new char[10] { 0x64, 0x75, 0x73, 0x6b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00 }, new char[16] { 0x72, 0x65, 0x69, 0x67, 0x6e, 0x6f, 0x66, 0x64, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x73, 0x73, 0x00 } }; LPSTR a1 = new CHAR[MAX_PATH]; GetModuleFileNameA(GetModuleHandleA(NULL), a1, MAX_PATH); std::filesystem::path a2(a1); delete[] a1; std::string a3 = a2.stem().string(); std::for_each(a3.begin(), a3.end(), [](char& a3) { a3 = ::tolower(a3); }); std::replace(a3.begin(), a3.end(), ' ', '_'); for (int i = 0; i < (sizeof(a0) / sizeof(a0[0])); i++) { if (strstr(a0[i], a3.c_str()) != NULL) { HANDLE current_process = GetCurrentProcess(); TerminateProcess(current_process, NULL); CloseHandle(current_process); return TRUE; } }
return TRUE; const char* a0[] = { new char[9] { 0x66, 0x61, 0x6c, 0x6c, 0x67, 0x75, 0x79, 0x73, 0x00 }, new char[13] { 0x70, 0x68, 0x61, 0x73, 0x6d, 0x6f, 0x70, 0x68, 0x6f, 0x62, 0x69, 0x61, 0x00 }, new char[9] { 0x72, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00 }, new char[14] { 0x67, 0x65, 0x6e, 0x73, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x00 }, new char[17] { 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x00 }, new char[14] { 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x33, 0x64, 0x00 }, new char[11] { 0x72, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x32, 0x00 }, new char[20] { 0x75, 0x6e, 0x69, 0x74, 0x79, 0x63, 0x72, 0x61, 0x73, 0x68, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x36, 0x34, 0x00 }, new char[10] { 0x64, 0x75, 0x73, 0x6b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00 }, new char[18] { 0x75, 0x6e, 0x69, 0x74, 0x79, 0x63, 0x72, 0x61, 0x73, 0x68, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 }, new char[16] { 0x72, 0x65, 0x69, 0x67, 0x6e, 0x6f, 0x66, 0x64, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x73, 0x73, 0x00 }, new char[8] { 0x6f, 0x75, 0x74, 0x77, 0x61, 0x72, 0x64, 0x00 } }; LPSTR a1 = new CHAR[MAX_PATH]; GetModuleFileNameA(GetModuleHandleA(NULL), a1, MAX_PATH); std::filesystem::path a2(a1); delete[] a1; std::string a3 = a2.stem().string(); std::for_each(a3.begin(), a3.end(), [](char& a3) { a3 = ::tolower(a3); }); std::replace(a3.begin(), a3.end(), ' ', '_'); for (int i = 0; i < (sizeof(a0) / sizeof(a0[0])); i++) { if (strstr(a0[i], a3.c_str()) != NULL) { HANDLE current_process = GetCurrentProcess(); TerminateProcess(current_process, NULL); CloseHandle(current_process); return TRUE; } }
DisableThreadLibraryCalls(hinstDLL);
Core::Initialize(hinstDLL);
return TRUE;
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/Core.h
Expand Up @@ -25,12 +25,12 @@ class Core
static std::string GetVersionStr();
static std::string GetVersionStrWithGameName(const char* GameVersion = NULL);
static void SetBasePath();
static bool IsRunningInWine() { return ((wine_get_version == NULL) ? false : true); }

private:
static const char* GetOSVersion();
static bool OSVersionCheck();
typedef const char* (*wine_get_version_t) ();
static wine_get_version_t wine_get_version;
static void SetupWineCheck();
static bool IsRunningInWine() { return ((wine_get_version == NULL) ? false : true); }
};
2 changes: 2 additions & 0 deletions Bootstrap/Managers/InternalCalls.cpp
Expand Up @@ -163,6 +163,8 @@ void InternalCalls::MelonUtils::AddInternalCalls()
Mono::AddInternalCall("MelonLoader.MelonUtils::IsGame32Bit", IsGame32Bit);
Mono::AddInternalCall("MelonLoader.MelonUtils::IsGameIl2Cpp", IsGameIl2Cpp);
Mono::AddInternalCall("MelonLoader.MelonUtils::IsOldMono", IsOldMono);
Mono::AddInternalCall("MelonLoader.MelonUtils::IsUnderWineOrSteamProton", Core::IsRunningInWine);

Mono::AddInternalCall("MelonLoader.MelonUtils::GetApplicationPath", GetApplicationPath);
Mono::AddInternalCall("MelonLoader.MelonUtils::GetGameDataDirectory", GetGameDataDirectory);
Mono::AddInternalCall("MelonLoader.MelonUtils::GetUnityVersion", GetUnityVersion);
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/Utils/AnalyticsBlocker.cpp
Expand Up @@ -11,7 +11,7 @@
#endif

bool AnalyticsBlocker::ShouldDAB = false;
const char* AnalyticsBlocker::BlockedList[] = { new char[29] { 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[13] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[16] { 0x73, 0x6f, 0x66, 0x74, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x61, 0x74, 0x2e, 0x75, 0x61, 0x00 }, new char[13] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[21] { 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[7] { 0x66, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[13] { 0x76, 0x72, 0x6d, 0x6f, 0x64, 0x73, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x00 }, new char[10] { 0x66, 0x62, 0x63, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[8] { 0x64, 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x00 }, new char[14] { 0x6f, 0x63, 0x75, 0x6c, 0x75, 0x73, 0x63, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[18] { 0x67, 0x61, 0x6d, 0x65, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[25] { 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[18] { 0x61, 0x7a, 0x75, 0x72, 0x65, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[24] { 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x6b, 0x69, 0x77, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[10] { 0x66, 0x62, 0x63, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[9] { 0x68, 0x61, 0x73, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[26] { 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x65, 0x2e, 0x69, 0x61, 0x70, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[12] { 0x69, 0x63, 0x65, 0x62, 0x75, 0x72, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x00 }, new char[12] { 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[13] { 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x00 }, new char[10] { 0x66, 0x62, 0x73, 0x62, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[22] { 0x63, 0x64, 0x70, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[6] { 0x66, 0x62, 0x2e, 0x6d, 0x65, 0x00 }, new char[8] { 0x68, 0x61, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[42] { 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6f, 0x70, 0x74, 0x6f, 0x75, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[11] { 0x69, 0x74, 0x65, 0x6f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x00 }, new char[9] { 0x70, 0x61, 0x73, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[21] { 0x67, 0x6c, 0x75, 0x65, 0x68, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2d, 0x61, 0x6c, 0x75, 0x68, 0x75, 0x74, 0x2e, 0x64, 0x65, 0x00 }, new char[14] { 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x74, 0x75, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[22] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2d, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[26] { 0x61, 0x70, 0x69, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[8] { 0x64, 0x72, 0x6f, 0x70, 0x62, 0x6f, 0x78, 0x00 }, new char[16] { 0x63, 0x72, 0x61, 0x73, 0x68, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[8] { 0x6d, 0x65, 0x61, 0x70, 0x2e, 0x67, 0x67, 0x00 }, new char[21] { 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x33, 0x64, 0x61, 0x77, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[30] { 0x70, 0x65, 0x72, 0x66, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 } };
const char* AnalyticsBlocker::BlockedList[] = { new char[13] { 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x00 }, new char[6] { 0x66, 0x62, 0x2e, 0x6d, 0x65, 0x00 }, new char[21] { 0x67, 0x6c, 0x75, 0x65, 0x68, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2d, 0x61, 0x6c, 0x75, 0x68, 0x75, 0x74, 0x2e, 0x64, 0x65, 0x00 }, new char[14] { 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x74, 0x75, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[12] { 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[26] { 0x61, 0x70, 0x69, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[30] { 0x70, 0x65, 0x72, 0x66, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[12] { 0x69, 0x63, 0x65, 0x62, 0x75, 0x72, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x00 }, new char[9] { 0x68, 0x61, 0x73, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[8] { 0x6d, 0x65, 0x61, 0x70, 0x2e, 0x67, 0x67, 0x00 }, new char[8] { 0x64, 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x00 }, new char[8] { 0x64, 0x72, 0x6f, 0x70, 0x62, 0x6f, 0x78, 0x00 }, new char[16] { 0x63, 0x72, 0x61, 0x73, 0x68, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[13] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[10] { 0x66, 0x62, 0x63, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[22] { 0x63, 0x64, 0x70, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[11] { 0x69, 0x74, 0x65, 0x6f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x00 }, new char[22] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2d, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[10] { 0x66, 0x62, 0x63, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[26] { 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x65, 0x2e, 0x69, 0x61, 0x70, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[13] { 0x76, 0x72, 0x6d, 0x6f, 0x64, 0x73, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x00 }, new char[9] { 0x70, 0x61, 0x73, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[21] { 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[13] { 0x66, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[9] { 0x73, 0x6b, 0x69, 0x64, 0x2d, 0x68, 0x75, 0x62, 0x00 }, new char[18] { 0x61, 0x7a, 0x75, 0x72, 0x65, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x00 }, new char[42] { 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6f, 0x70, 0x74, 0x6f, 0x75, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[24] { 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x6b, 0x69, 0x77, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[18] { 0x67, 0x61, 0x6d, 0x65, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[14] { 0x6f, 0x63, 0x75, 0x6c, 0x75, 0x73, 0x63, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[8] { 0x68, 0x61, 0x74, 0x65, 0x62, 0x69, 0x6e, 0x00 }, new char[16] { 0x73, 0x6f, 0x66, 0x74, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x61, 0x74, 0x2e, 0x75, 0x61, 0x00 }, new char[25] { 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[21] { 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x33, 0x64, 0x61, 0x77, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[10] { 0x66, 0x62, 0x73, 0x62, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[29] { 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x75, 0x63, 0x61, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x33, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[7] { 0x66, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x00 } };
std::list<std::string> AnalyticsBlocker::DABList = { new char[8] { 0x6e, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x00 }, new char[13] { 0x62, 0x6f, 0x6e, 0x65, 0x74, 0x6f, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[11] { 0x73, 0x61, 0x6d, 0x62, 0x6f, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x00 }, new char[11] { 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[14] { 0x72, 0x75, 0x62, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[16] { 0x6d, 0x65, 0x6c, 0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[22] { 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x75, 0x73, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x00 }, new char[20] { 0x74, 0x68, 0x65, 0x74, 0x72, 0x75, 0x65, 0x79, 0x6f, 0x73, 0x68, 0x69, 0x66, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x00 } };

bool AnalyticsBlocker::Initialize()
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -30,6 +30,8 @@
1. Added User Libs Directory and Assembly Resolver.
2. Replaced StackTrace System in MelonLogger with Instance Based System.
3. Fixed Issue with Il2Cpp Harmony Method Patcher throwing Debug Warnings multiple times for the same Method.
4. Implemented Temporary Workaround for Cpp2IL Failing under Wine or Steam Proton.
5. Updated Cpp2IL to v2021.3.4.

---

Expand Down
6 changes: 5 additions & 1 deletion Il2CppAssemblyGenerator/Core.cs
Expand Up @@ -50,7 +50,11 @@ private static int Run()
if (!unitydependencies.Download())
return 1;

dumper = new Cpp2IL();
// Temporary Workaround for Cpp2IL Failing under Wine or Steam Proton
if (MelonUtils.IsUnderWineOrSteamProton())
dumper = new Il2CppDumper();
else
dumper = new Cpp2IL();
if (!dumper.Download())
return 1;

Expand Down
2 changes: 1 addition & 1 deletion Il2CppAssemblyGenerator/Packages/Cpp2IL.cs
Expand Up @@ -11,7 +11,7 @@ internal Cpp2IL()
if (string.IsNullOrEmpty(Version) || Version.Equals("0.0.0.0"))
Version = RemoteAPI.Info.ForceDumperVersion;
if (string.IsNullOrEmpty(Version) || Version.Equals("0.0.0.0"))
Version = "2021.2.4";
Version = "2021.3.4";
string exe_name = $"Cpp2IL-{Version}-Windows.exe";
URL = $"https://github.com/SamboyCoding/Cpp2IL/releases/download/{Version}/{exe_name}";
Destination = Path.Combine(Core.BasePath, "Cpp2IL");
Expand Down
2 changes: 2 additions & 0 deletions MelonLoader/MelonUtils.cs
Expand Up @@ -287,6 +287,8 @@ public static IntPtr GetNativeLibraryExport(this IntPtr ptr, string name)
[MethodImpl(MethodImplOptions.InternalCall)]
public extern static bool IsOldMono();
[MethodImpl(MethodImplOptions.InternalCall)]
public extern static bool IsUnderWineOrSteamProton();
[MethodImpl(MethodImplOptions.InternalCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public extern static string GetApplicationPath();
[MethodImpl(MethodImplOptions.InternalCall)]
Expand Down

1 comment on commit 5bf2aa6

@HerpDerpinstine
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#97

Please sign in to comment.