fix(anticheat): fix potential memory leak

This commit is contained in:
maybegreat48 committed 2025-06-08 12:12:19 -04:00
1 parent e498ec732b
commit 9c6f9752b6
4 files changed
+135 -1

No files matched your search

+7 -1
View File
@@ -132,9 +132,10 @@ namespace YimMenu
WriteNodeData = ptr.As<PVOID>();
});
constexpr auto shouldUseNodeCachePtrn = Pattern<"83 FA 20 74 1D 48 89 CE">("ShouldUseNodeCache");
constexpr auto shouldUseNodeCachePtrn = Pattern<"83 FA 20 74 1D 48 89 CE">("ShouldUseNodeCache&Nullsub");
scanner.Add(shouldUseNodeCachePtrn, [this](PointerCalculator ptr) {
ShouldUseNodeCache = ptr.Sub(5).As<PVOID>();
Nullsub = ptr.Add(0x29).As<PVOID>();
});
constexpr auto isNodeInScopePtrn = Pattern<"41 83 F9 02 74 22 48 8B 06">("IsNodeInScope");
@@ -389,6 +390,11 @@ namespace YimMenu
AssistedAimFindNewTarget = ptr.Sub(0x33).As<Functions::AssistedAimFindNewTarget>();
});
constexpr auto gameSkeletonPtrn = Pattern<"0F B6 C0 8D 14 00 83 C2 02">("GameSkeleton");
scanner.Add(gameSkeletonPtrn, [this](PointerCalculator ptr) {
GameSkeleton = ptr.Add(0x9).Add(3).Rip().As<rage::gameSkeleton*>();
});
if (!scanner.Scan())
{
LOG(FATAL) << "Some patterns could not be found, unloading.";