[Ceg]: Update (#554)

This commit is contained in:
Edo 2022-11-08 00:19:17 +00:00 committed by GitHub
parent e96c4029b8
commit 207835be4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 33 deletions

View File

@ -10,22 +10,22 @@ namespace Components
signature.add({
"\x56\x8B\x00\x24\x0c\x85\xF6\x7F\x0E", "xx?xxxxxx", [](char* address)
{
Utils::Hook::Set<BYTE>(address, 0xC3);
Utils::Hook::Set<std::uint8_t>(address, 0xC3);
}
});
signature.process();
// Some more generic obfuscation (mov al, 1; retn)
Utils::Hook::Set<DWORD>(0x471B20, 0xC301B0);
Utils::Hook::Set<DWORD>(0x43A070, 0xC301B0);
Utils::Hook::Set<DWORD>(0x4C8B30, 0xC301B0);
Utils::Hook::Set<DWORD>(0x469340, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x471B20, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x43A070, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x4C8B30, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x469340, 0xC301B0);
// Other checks
Utils::Hook::Set<DWORD>(0x401000, 0xC301B0);
Utils::Hook::Set<DWORD>(0x45F8B0, 0xC301B0);
Utils::Hook::Set<DWORD>(0x46FAE0, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x401000, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x45F8B0, 0xC301B0);
Utils::Hook::Set<std::uint32_t>(0x46FAE0, 0xC301B0);
// Removed in 159 SP binaries
Utils::Hook::Nop(0x46B173, 9);
@ -38,17 +38,18 @@ namespace Components
Utils::Hook::Nop(0x405A36, 9);
// Random checks scattered throughout the binary
Utils::Hook::Set<BYTE>(0x499F90, 0xC3);
Utils::Hook::Set<BYTE>(0x4FC700, 0xC3);
Utils::Hook::Set<BYTE>(0x4C4170, 0xC3);
Utils::Hook::Set<BYTE>(0x49E8C0, 0xC3);
Utils::Hook::Set<BYTE>(0x42DB00, 0xC3);
Utils::Hook::Set<BYTE>(0x4F4CF0, 0xC3);
Utils::Hook::Set<BYTE>(0x432180, 0xC3);
Utils::Hook::Set<BYTE>(0x461930, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x499F90, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x4FC700, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x4C4170, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x49E8C0, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x42DB00, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x4F4CF0, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x432180, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x461930, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x430410, 0xC3);
// Used next to file system functions
Utils::Hook::Set<BYTE>(0x47BC00, 0xC3);
Utils::Hook::Set<std::uint8_t>(0x47BC00, 0xC3);
// Looking for stuff in the registry
Utils::Hook::Nop(0x4826F8, 5);

View File

@ -134,8 +134,6 @@ namespace Components
}
void Localization::LoadLanguageStrings()
{
//if (ZoneBuilder::IsEnabled())
{
if (FileSystem::File(Utils::String::VA("localizedstrings/iw4x_%s.str", Game::Win_GetLanguage())).exists())
{
@ -146,7 +144,6 @@ namespace Components
Game::SE_Load("localizedstrings/iw4x_english.str", 0);
}
}
}
__declspec(naked) void Localization::SELoadLanguageStub()
{
@ -434,7 +431,7 @@ namespace Components
std::string key = Utils::String::VA("CLASS_SLOT%i", i);
std::string value = asset.localize->value;
Utils::String::Replace(value, "1", Utils::String::VA("%i", i)); // Pretty ugly, but it should work
Utils::String::Replace(value, "1", std::to_string(i)); // Pretty ugly, but it should work
Localization::Set(key, value);
}

View File

@ -446,11 +446,6 @@ namespace Components
// default sv_pure to 0
Utils::Hook::Set<BYTE>(0x4D3A74, 0);
// Force debug logging
Utils::Hook::Set<BYTE>(0x60AE4A, 1);
//Utils::Hook::Nop(0x60AE49, 8);
//Utils::Hook::Set<BYTE>(0x6FF53C, 0);
// remove activeAction execution (exploit in mods)
Utils::Hook::Set<BYTE>(0x5A1D43, 0xEB);