aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/shared/exploit_fixes
diff options
context:
space:
mode:
authorF1F7Y <64418963+F1F7Y@users.noreply.github.com>2023-07-07 12:28:35 +0200
committerGitHub <noreply@github.com>2023-07-07 12:28:35 +0200
commit513705e33f59273c5b463c0da874a0066e8d0589 (patch)
tree76c66af8d46d0cdd864cefcc2ef9a237a80ddb5b /NorthstarDLL/shared/exploit_fixes
parent043fb83d8febc9d277064d5b24e60832375a110f (diff)
downloadNorthstarLauncher-513705e33f59273c5b463c0da874a0066e8d0589.tar.gz
NorthstarLauncher-513705e33f59273c5b463c0da874a0066e8d0589.zip
Memory class renaming (#469)
- Renames `MemoryAddress` to `CMemoryAddress` - Renames `CMemoryAddress::As` to `CMemoryAddress::RCast`
Diffstat (limited to 'NorthstarDLL/shared/exploit_fixes')
-rw-r--r--NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp8
-rw-r--r--NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp4
-rw-r--r--NorthstarDLL/shared/exploit_fixes/ns_limits.cpp2
3 files changed, 7 insertions, 7 deletions
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<INT64(__fastcall*)(DWORD, char*)>();
+ sub_F1320 = module.FindPattern("83 F9 7F 77 08 88 0A").RCast<INT64(__fastcall*)(DWORD, char*)>();
}
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<float (*)()>();
+ CEngineServer__GetTimescale = module.Offset(0x240840).RCast<float (*)()>();
}
ON_DLL_LOAD("server.dll", ServerLimitsServer, (CModule module))