r5sdk/r5dev/engine/traceinit.h
Kawe Mazidjatari 2501c37044 Globally convert all byte patterns to strings
These get reconverted to masked byte patterns at runtime. With the signature map cache system, this will only happen when building the cache.
2022-12-01 22:44:55 +01:00

30 lines
1.1 KiB
C++

#ifndef TRACEINIT_H
#define TRACEINIT_H
inline CMemory p_TRACEINIT;
inline auto v_TRACEINIT = p_TRACEINIT.RCast<void(*)(void* undef, const char* initfunc, const char* shutdownfunc)>();
///////////////////////////////////////////////////////////////////////////////
class VTraceInit : public IDetour
{
virtual void GetAdr(void) const
{
spdlog::debug("| FUN: TRACEINIT : {:#18x} |\n", p_TRACEINIT.GetPtr());
spdlog::debug("+----------------------------------------------------------------+\n");
}
virtual void GetFun(void) const
{
p_TRACEINIT = g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 49 8B F8 48 8B F2 48 85 C0");
v_TRACEINIT = p_TRACEINIT.RCast<void (*)(void*, const char*, const char*)>(); /*48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B 05 ? ? ? ? 49 8B F8 48 8B F2 48 85 C0*/
}
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(VTraceInit);
#endif // TRACEINIT_H