From 513705e33f59273c5b463c0da874a0066e8d0589 Mon Sep 17 00:00:00 2001 From: F1F7Y <64418963+F1F7Y@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:28:35 +0200 Subject: Memory class renaming (#469) - Renames `MemoryAddress` to `CMemoryAddress` - Renames `CMemoryAddress::As` to `CMemoryAddress::RCast` --- NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp | 8 ++++---- NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp | 4 ++-- NorthstarDLL/shared/exploit_fixes/ns_limits.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'NorthstarDLL/shared/exploit_fixes') diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp index 338de306..2a0a9c2c 100644 --- a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp +++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp @@ -98,7 +98,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 (MemoryAddress(entry).IsMemoryReadable(sizeof(*entry))) + if (CMemoryAddress(entry).IsMemoryReadable(sizeof(*entry))) { // Find null terminators bool nameValid = false, valValid = false; @@ -405,9 +405,9 @@ ON_DLL_LOAD("engine.dll", EngineExploitFixes, (CModule module)) // patch to set bWasWritingStringTableSuccessful in CNetworkStringTableContainer::WriteBaselines if it fails { - MemoryAddress writeAddress(&bWasWritingStringTableSuccessful - module.Offset(0x234EDC).m_nAddress); + CMemoryAddress writeAddress(&bWasWritingStringTableSuccessful - module.Offset(0x234EDC).m_nAddress); - MemoryAddress addr = module.Offset(0x234ED2); + CMemoryAddress addr = module.Offset(0x234ED2); addr.Patch("C7 05"); addr.Offset(2).Patch((BYTE*)&writeAddress, sizeof(writeAddress)); @@ -435,7 +435,7 @@ ON_DLL_LOAD_RELIESON("server.dll", ServerExploitFixes, ConVar, (CModule module)) // Prevent these from actually doing anything for (auto exportName : ANTITAMPER_EXPORTS) { - MemoryAddress exportAddr = module.GetExport(exportName); + CMemoryAddress exportAddr = module.GetExport(exportName); if (exportAddr) { // Just return, none of them have any args or are userpurge diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp index de0b0f21..3d97f750 100644 --- a/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp +++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp @@ -67,7 +67,7 @@ bool __fastcall CheckUTF8Valid(INT64* a1, DWORD* a2, char* strData) { while (1) { - if (!MemoryAddress(v4).IsMemoryReadable(1)) + if (!CMemoryAddress(v4).IsMemoryReadable(1)) return false; // INVALID v11 = *v4++; // crash potential @@ -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").As(); + sub_F1320 = module.FindPattern("83 F9 7F 77 08 88 0A").RCast(); } diff --git a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp index e69ef41c..c9085cb0 100644 --- a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp +++ b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp @@ -289,7 +289,7 @@ ON_DLL_LOAD_RELIESON("engine.dll", ServerLimits, ConVar, (CModule module)) FCVAR_GAMEDLL, "Increase usercmd processing budget by tickinterval * value per tick"); - CEngineServer__GetTimescale = module.Offset(0x240840).As(); + CEngineServer__GetTimescale = module.Offset(0x240840).RCast(); } ON_DLL_LOAD("server.dll", ServerLimitsServer, (CModule module)) -- cgit v1.2.3