feat(Util/System): Get rel address of pointer
This commit is contained in:
parent
c922f4d498
commit
48a8c3d00a
@ -25,6 +25,13 @@ namespace big::system
|
|||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline uintptr_t get_relative_address(void* ptr)
|
||||||
|
{
|
||||||
|
uintptr_t base_address = memory::module(nullptr).begin().as<uintptr_t>();
|
||||||
|
|
||||||
|
return (uintptr_t)ptr - base_address;
|
||||||
|
}
|
||||||
|
|
||||||
inline void patch_blame(bool toggle)
|
inline void patch_blame(bool toggle)
|
||||||
{
|
{
|
||||||
*(unsigned short*)g_pointers->m_blame_explode = toggle ? 0xE990 : 0x850F;
|
*(unsigned short*)g_pointers->m_blame_explode = toggle ? 0xE990 : 0x850F;
|
||||||
|
Reference in New Issue
Block a user