pickup combining, almost finish shadow stones, fix some bugs with gadgets, clean up some code.
This commit is contained in:
Milxnor
2023-05-02 23:48:05 -04:00
parent 3b0f0ad4e1
commit f49f166c2d
27 changed files with 574 additions and 216 deletions

26
vendor/memcury.h vendored
View File

@@ -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; }