mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
great
pickup combining, almost finish shadow stones, fix some bugs with gadgets, clean up some code.
This commit is contained in:
26
vendor/memcury.h
vendored
26
vendor/memcury.h
vendored
@@ -758,10 +758,13 @@
|
||||
return Scanner(add);
|
||||
}
|
||||
|
||||
static auto FindPointerRef(void* Pointer, int useRefNum = 0, bool bUseFirstResult = false) -> Scanner // credit me and ender
|
||||
static auto FindPointerRef(void* Pointer, int useRefNum = 0, bool bUseFirstResult = false, bool bWarnIfNotFound = true) -> Scanner // credit me and ender
|
||||
{
|
||||
PE::Address add{ nullptr };
|
||||
|
||||
if (!Pointer)
|
||||
return Scanner(add);
|
||||
|
||||
auto textSection = PE::Section::GetSection(".text");
|
||||
|
||||
const auto scanBytes = reinterpret_cast<std::uint8_t*>(textSection.GetSectionStart().Get());
|
||||
@@ -803,14 +806,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (add == 0)
|
||||
|
||||
if (bWarnIfNotFound)
|
||||
{
|
||||
MessageBoxA(0, "FindPointerRef return nullptr", "Memcury", MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
// MessageBoxA(0, std::format("FindPointerRef return 0x{:x}", add.Get() - __int64(GetModuleHandleW(0))).c_str(), "Memcury", MB_OK);
|
||||
if (add == 0)
|
||||
{
|
||||
MessageBoxA(0, "FindPointerRef return nullptr", "Memcury", MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
// MessageBoxA(0, std::format("FindPointerRef return 0x{:x}", add.Get() - __int64(GetModuleHandleW(0))).c_str(), "Memcury", MB_OK);
|
||||
}
|
||||
}
|
||||
|
||||
return Scanner(add);
|
||||
@@ -1423,4 +1429,6 @@
|
||||
} */
|
||||
|
||||
return PtrRef.ScanFor(Bytes, false).Get();
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsNullSub(uint64 Addr) { return *(uint8_t*)(Addr) == 0xC3 || *(uint8_t*)(Addr) == 0xC2; }
|
||||
Reference in New Issue
Block a user