diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2024-03-04 00:01:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 01:01:32 +0100 |
commit | 4b0726d97788edff5d83476cb52057f409d623af (patch) | |
tree | dad38132c6353af708a71af8e795aa34a19b4b3a /primedev/shared/exploit_fixes | |
parent | e1eb2a6f4b858e903603226098861c3b62d5d1a4 (diff) | |
download | NorthstarLauncher-4b0726d97788edff5d83476cb52057f409d623af.tar.gz NorthstarLauncher-4b0726d97788edff5d83476cb52057f409d623af.zip |
Update silver-bun to `72c74b4` (#664)
Bumps the vendored silver-bun library to the newest commit in upstream
Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Co-authored-by: IcePixelx <41352111+IcePixelx@users.noreply.github.com>
Diffstat (limited to 'primedev/shared/exploit_fixes')
-rw-r--r-- | primedev/shared/exploit_fixes/exploitfixes.cpp | 8 | ||||
-rw-r--r-- | primedev/shared/exploit_fixes/exploitfixes_utf8parser.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/primedev/shared/exploit_fixes/exploitfixes.cpp b/primedev/shared/exploit_fixes/exploitfixes.cpp index cade4084..7850f7b0 100644 --- a/primedev/shared/exploit_fixes/exploitfixes.cpp +++ b/primedev/shared/exploit_fixes/exploitfixes.cpp @@ -103,7 +103,7 @@ bool, __fastcall, (void* pMsg)) // 48 8B D1 48 8B 49 18 48 8B 01 48 FF 60 10 auto entry = msg->m_ConVars + i; // Safety check for memory access - if (CMemoryAddress(entry).IsMemoryReadable(sizeof(*entry))) + if (CMemory(entry).IsMemoryReadable(sizeof(*entry))) { // Find null terminators bool nameValid = false, valValid = false; @@ -421,9 +421,9 @@ ON_DLL_LOAD("engine.dll", EngineExploitFixes, (CModule module)) // patch to set bWasWritingStringTableSuccessful in CNetworkStringTableContainer::WriteBaselines if it fails { - CMemoryAddress writeAddress(&bWasWritingStringTableSuccessful - module.Offset(0x234EDC).m_nAddress); + CMemory writeAddress(&bWasWritingStringTableSuccessful - module.Offset(0x234EDC).GetPtr()); - CMemoryAddress addr = module.Offset(0x234ED2); + CMemory addr = module.Offset(0x234ED2); addr.Patch("C7 05"); addr.Offset(2).Patch((BYTE*)&writeAddress, sizeof(writeAddress)); @@ -451,7 +451,7 @@ ON_DLL_LOAD_RELIESON("server.dll", ServerExploitFixes, ConVar, (CModule module)) // Prevent these from actually doing anything for (auto exportName : ANTITAMPER_EXPORTS) { - CMemoryAddress exportAddr = module.GetExport(exportName); + CMemory exportAddr = module.GetExportedFunction(exportName); if (exportAddr) { // Just return, none of them have any args or are userpurge 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*)>(); } |