diff --git a/dllmain.c b/dllmain.c index db728eb..fdbcaf8 100644 --- a/dllmain.c +++ b/dllmain.c @@ -244,10 +244,10 @@ int __stdcall DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpReserved) { } else if (!__stricmp(p, "vietcong2.exe") || !__stricmp(p, "vc2ded.exe")) { // Vietcong 2 force_bind_ip = 0; patch_vc2(); - } else if (!__stricmp(p, "fearmp.exe")) { // FEAR (Client) + } else if (!__stricmp(p, "fearmp.exe") || !__stricmp(p, "fearxp.exe") || !__stricmp(p, "fearxp2.exe")) { // FEAR (Client) force_bind_ip = 0; patch_fear_cli(); - } else if (!__stricmp(p, "fearserver.exe")) { // FEAR (Server) + } else if (!__stricmp(p, "fearserver.exe") || !__stricmp(p, "fearserverxp.exe")) { // FEAR (Server) force_bind_ip = 0; patch_fear_srv(); } else if (!__stricmp(p, "bond.exe") || !__stricmp(p, "bond_ded.exe")) { // James Bond - Nightfire diff --git a/include/game_fear.h b/include/game_fear.h index 91c6dd4..7c5ccc2 100644 --- a/include/game_fear.h +++ b/include/game_fear.h @@ -55,8 +55,12 @@ __forceinline static void fear_disable_key_request(ULONG_PTR addr) { } DWORD __stdcall fear_hk_GetPrivateProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName) { - if (lpAppName && lpKeyName && !__strcmp(lpAppName, "FEAR") && !__strcmp(lpKeyName, "CDKey")) { - if (lpFileName && __strstr(lpFileName, "FEARCombat")) + if (lpAppName && lpReturnedString && lpKeyName && nSize >= 24 && !__strcmp(lpKeyName, "CDKey")) { + if (!__strcmp(lpAppName, "FEARXP")) + __strcpy(lpReturnedString, "SAP6-NUD3-LAP5-RAP2-9565"); // Generic FEARXP + else if (!__strcmp(lpAppName, "FEARXP2")) + __strcpy(lpReturnedString, "TAP6-WAB6-CAG3-BES3-9883"); // Generic FEARXP2 + else if (!__strcmp(lpAppName, "FEAR") && lpFileName && __strstr(lpFileName, "FEARCombat")) __strcpy(lpReturnedString, "LER7-BAB6-JYX5-BYX6-6324"); // Generic MPFREE else __strcpy(lpReturnedString, "NAS3-XUS9-SER5-JET6-5558"); // Generic Retail