diff --git a/src/Image.cpp b/src/Image.cpp index e550ba81..ddad54c7 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -17,6 +17,7 @@ void Image::Initialize() static uint8_t s_Guid106[] = { 0x67, 0xFB, 0x96, 0x6B, 0xAA, 0x3D, 0x57, 0x4E, 0x93, 0x8F, 0x1C, 0xC5, 0x85, 0xc6, 0xF5, 0x29 }; static uint8_t s_Guid110[] = { 0xE0, 0xC2, 0x94, 0x64, 0x5C, 0xB4, 0x32, 0x45, 0x95, 0x10, 0x09, 0xA1, 0x0F, 0xB2, 0x53, 0xF8 }; static uint8_t s_Guid111[] = { 0x8C, 0x13, 0x59, 0xA9, 0x7E, 0x6E, 0x49, 0x4F, 0x82, 0xF9, 0xCF, 0x58, 0x71, 0x6B, 0x7D, 0x3A }; + static uint8_t s_Guid112[] = { 0x7B, 0x51, 0xF5, 0x2C, 0x87, 0xD0, 0xFF, 0x40, 0x83, 0xE5, 0xAA, 0x6C, 0x07, 0xE9, 0x95, 0x20 }; mem::module mainModule = mem::module::main(); @@ -58,6 +59,8 @@ void Image::Initialize() version = MakeVersion(1, 10); else if (memcmp(&pdb_info->Guid, s_Guid111, 16) == 0) version = MakeVersion(1, 11); + else if (memcmp(&pdb_info->Guid, s_Guid112, 16) == 0) + version = MakeVersion(1, 12); else { for (auto c : pdb_info->Guid) diff --git a/src/Image.h b/src/Image.h index 87191812..d6edb8bb 100644 --- a/src/Image.h +++ b/src/Image.h @@ -6,7 +6,7 @@ struct Image static std::tuple GetSupportedVersion() noexcept { - return std::make_tuple(1, 11); + return std::make_tuple(1, 12); } static uint64_t MakeVersion(uint32_t aMajor, uint16_t aMinor) noexcept diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 72956399..2b15c5fa 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -17,7 +17,6 @@ void OptionsInitHook(const Image* apImage); void DisableIntroMoviesPatch(const Image* apImage); void DisableVignettePatch(const Image* apImage); void DisableBoundaryTeleportPatch(const Image* apImage); -void SaveVulnerabilityPatch(const Image* apImage); static HANDLE s_modInstanceMutex = nullptr; @@ -38,8 +37,6 @@ static void Initialize() if (s_modInstanceMutex == nullptr) return; - SaveVulnerabilityPatch(&options.GameImage); - // initialize patches if (options.PatchEnableDebug) EnableDebugPatch(&options.GameImage); diff --git a/src/patches/SaveVulnerability.cpp b/src/patches/SaveVulnerability.cpp deleted file mode 100644 index dc3ae6ff..00000000 --- a/src/patches/SaveVulnerability.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include - -#include "Image.h" - -void SaveVulnerabilityPatch(const Image* apImage) -{ - const mem::pattern cPattern("B8 FF 01 00 00 48 8B F7 48 3B F8 48 8B D3 49 8B"); - const mem::default_scanner cScanner(cPattern); - auto pLocation = cScanner(apImage->TextRegion).as(); - - if(pLocation == nullptr) - { - spdlog::warn("Save vulnerability patch: failed, could not be found"); - return; - } - - DWORD oldProtect = 0; - VirtualProtect(pLocation, 32, PAGE_EXECUTE_WRITECOPY, &oldProtect); - pLocation[2] = 0; - VirtualProtect(pLocation, 32, oldProtect, nullptr); - - spdlog::info("Save vulnerability patch: success"); -} diff --git a/vendor/RED4ext.SDK b/vendor/RED4ext.SDK index 7e72901a..0c3a6973 160000 --- a/vendor/RED4ext.SDK +++ b/vendor/RED4ext.SDK @@ -1 +1 @@ -Subproject commit 7e72901aca2e2f64f9103f39a1b791f02fb5fe1e +Subproject commit 0c3a6973b0fa970f9785c434f66fcf942cf27bb3