aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-05-21 22:55:26 +0200
committerGitHub <noreply@github.com>2024-05-21 22:55:26 +0200
commitd1d4f2a086209f041fa357e03fdf93614a7a9fd7 (patch)
tree290b09ba4b9eec05deaf6dd44d7bd8afad86c31b /primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp
parent60d872d3756854d29b65b63fb146aa4f638dd29e (diff)
parent220b7a1bf7915a336b9c2a08806e60c1c32bde8e (diff)
downloadNorthstarLauncher-chore/revert-zlib-cmake-fix.tar.gz
NorthstarLauncher-chore/revert-zlib-cmake-fix.zip
Merge branch 'main' into chore/revert-zlib-cmake-fixchore/revert-zlib-cmake-fix
Diffstat (limited to 'primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp')
-rw-r--r--primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp b/primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp
index 3d97f750..d63ba38a 100644
--- a/primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp
+++ b/primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp
@@ -67,7 +67,7 @@ bool __fastcall CheckUTF8Valid(INT64* a1, DWORD* a2, char* strData)
{
while (1)
{
- if (!CMemoryAddress(v4).IsMemoryReadable(1))
+ if (!CMemory(v4).IsMemoryReadable(1))
return false; // INVALID
v11 = *v4++; // crash potential
@@ -174,7 +174,7 @@ AUTOHOOK(Rson_ParseUTF8, engine.dll + 0xEF670,
bool, __fastcall, (INT64* a1, DWORD* a2, char* strData)) // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 20 8B 1A
// clang-format on
{
- static void* targetRetAddr = CModule("engine.dll").FindPattern("84 C0 75 2C 49 8B 16");
+ static void* targetRetAddr = CModule("engine.dll").FindPatternSIMD("84 C0 75 2C 49 8B 16");
// only call if we're parsing utf8 data from the network (i.e. communities), otherwise we get perf issues
void* pReturnAddress =
@@ -195,5 +195,5 @@ ON_DLL_LOAD("engine.dll", EngineExploitFixes_UTF8Parser, (CModule module))
{
AUTOHOOK_DISPATCH()
- sub_F1320 = module.FindPattern("83 F9 7F 77 08 88 0A").RCast<INT64(__fastcall*)(DWORD, char*)>();
+ sub_F1320 = module.FindPatternSIMD("83 F9 7F 77 08 88 0A").RCast<INT64(__fastcall*)(DWORD, char*)>();
}