From de7deafc7e6ba53deec8dd3c05d2ea5e7cf42264 Mon Sep 17 00:00:00 2001 From: KittenPopo Date: Wed, 23 Mar 2022 13:03:56 -0700 Subject: Implement KittenPopo exploit fixes (and sanity changes) (#112) * Added main exploit fixes * Fixed typo in sigscanning.cpp * Fully implemented * Added proper includes for new files * Update README.md * typo * spare me my sanity (fixed ridiculous code) * Added rest of KittenMemUtils * Rename KittenMemUtils * Removed all messy memory edits, implemented NSMem instead * Update NorthstarDedicatedTest.vcxproj * [1] Move everything from securitypatches to ExploitFixes * [2] Move everything from securitypatches to ExploitFixes * Fixed module offsets in stack trace * Fixed UTF8 Parsing (Multiplayer Crash) * Implemented UT8 fix * Update NorthstarDedicatedTest.vcxproj * Update hookutils.cpp * Small fixes * all my homies hate clang-format * Temporarily restore README.md --- NorthstarDedicatedTest/maxplayers.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'NorthstarDedicatedTest/maxplayers.cpp') diff --git a/NorthstarDedicatedTest/maxplayers.cpp b/NorthstarDedicatedTest/maxplayers.cpp index 674d3ef0..54f1a896 100644 --- a/NorthstarDedicatedTest/maxplayers.cpp +++ b/NorthstarDedicatedTest/maxplayers.cpp @@ -45,10 +45,9 @@ constexpr int Team_PlayerArray_AddedLength = NEW_MAX_PLAYERS - 32; constexpr int Team_PlayerArray_AddedSize = PAD_NUMBER(Team_PlayerArray_AddedLength * 8, 4); constexpr int Team_AddedSize = Team_PlayerArray_AddedSize; -template void ChangeOffset(void* addr, unsigned int offset) -{ - TempReadWrite rw(addr); - *((T*)addr) = offset; +#include "NSMem.h" +template void ChangeOffset(void* addr, unsigned int offset) { + NSMem::BytePatch((uintptr_t)addr, (BYTE*)&offset, sizeof(T)); } /* -- cgit v1.2.3