Skip to content

Commit

Permalink
Remove references to obsolete FarCry5 Easy Anti-Cheat bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Oct 24, 2024
1 parent f2e20da commit ce83e1e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 73 deletions.
Binary file modified include/SpecialK/resource.h
Binary file not shown.
1 change: 0 additions & 1 deletion resource/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ IDR_LICENSE_FILEBROWSER TEXT "licenses/imgui-filebrowser.tx
#if !(defined _WIN64)
#else
//IDR_LIBSCEPAD_PACKAGE 7ZIP "packages/libScePad_64.7z"
//IDR_FC5_KILL_ANTI_CHEAT 7ZIP "packages/FC5_EasyAntiCheat_x64.7z"
#endif


Expand Down
72 changes: 0 additions & 72 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,78 +562,6 @@ extern void BasicInit (void);
SK_Sekiro_InitPlugin ();
break;

case SK_GAME_ID::FarCry5:
{
auto _UnpackEasyAntiCheatBypass = [&](void) ->
void
{
HMODULE hModSelf =
SK_GetDLL ();

HRSRC res =
FindResource ( hModSelf, MAKEINTRESOURCE (IDR_FC5_KILL_ANTI_CHEAT), L"7ZIP" );

if (res)
{
DWORD res_size =
SizeofResource ( hModSelf, res );

HGLOBAL packed_anticheat =
LoadResource ( hModSelf, res );

if (! packed_anticheat) return;

const void* const locked =
(void *)LockResource (packed_anticheat);

if (locked != nullptr)
{
wchar_t wszBackup [MAX_PATH + 2] = { };
wchar_t wszArchive [MAX_PATH + 2] = { };
wchar_t wszDestination [MAX_PATH + 2] = { };

wcscpy (wszDestination, SK_GetHostPath ());

if (GetFileAttributesW (wszDestination) == INVALID_FILE_ATTRIBUTES)
SK_CreateDirectories (wszDestination);

PathAppendW (wszDestination, L"EasyAntiCheat");
wcscpy (wszBackup, wszDestination);
PathAppendW (wszBackup, L"EasyAntiCheat_x64_orig.dll");

if (GetFileAttributesW (wszBackup) == INVALID_FILE_ATTRIBUTES)
{
wchar_t wszBackupSrc [MAX_PATH + 2] = { };
wcscpy (wszBackupSrc, wszDestination);
PathAppendW (wszBackupSrc, L"EasyAntiCheat_x64.dll");
CopyFileW (wszBackupSrc, wszBackup, TRUE);

SK_LOG0 ( ( L"Unpacking EasyAntiCheatDefeat for FarCry 5" ),
L"AntiDefeat" );

wcscpy (wszArchive, wszDestination);
PathAppendW (wszArchive, L"EasyAntiCheatDefeat.7z");

FILE* fPackedCompiler =
_wfopen (wszArchive, L"wb");

if (fPackedCompiler != nullptr)
{
fwrite (locked, 1, res_size, fPackedCompiler);
fclose (fPackedCompiler);
}

SK_Decompress7zEx (wszArchive, wszDestination, nullptr);
DeleteFileW (wszArchive);
}
}

UnlockResource (packed_anticheat);
}
};

_UnpackEasyAntiCheatBypass ();
} break;
case SK_GAME_ID::Ys_Eight:
SK_YS8_InitPlugin ();
break;
Expand Down

0 comments on commit ce83e1e

Please sign in to comment.