#pragma once #include "engine/common.h" /* ==== UTILITY ========================================================================================================================================================= */ inline CMemory p_Sys_Error_Internal; inline auto Sys_Error_Internal = p_Sys_Error_Internal.RCast(); inline bool* gfExtendedError = nullptr; /////////////////////////////////////////////////////////////////////////////// int HSys_Error_Internal(char* fmt, va_list args); /////////////////////////////////////////////////////////////////////////////// class VSys_Dll : public IDetour { virtual void GetAdr(void) const { LogFunAdr("Sys_Error_Internal", p_Sys_Error_Internal.GetPtr()); LogVarAdr("gfExtendedError", reinterpret_cast(gfExtendedError)); } virtual void GetFun(void) const { p_Sys_Error_Internal = g_GameDll.FindPatternSIMD("48 89 5C 24 08 48 89 74 24 10 57 48 81 EC 30 08 ?? ?? 48 8B DA 48 8B F9 E8 ?? ?? ?? FF 33 F6 48"); Sys_Error_Internal = p_Sys_Error_Internal.RCast(); /*48 89 5C 24 08 48 89 74 24 10 57 48 81 EC 30 08 00 00 48 8B DA 48 8B F9 E8 ?? ?? ?? FF 33 F6 48*/ } virtual void GetVar(void) const { gfExtendedError = p_COM_ExplainDisconnection.Offset(0x0).FindPatternSelf("C6 05", CMemory::Direction::DOWN, 300).ResolveRelativeAddressSelf(0x2, 0x7).RCast(); } virtual void GetCon(void) const { } virtual void Attach(void) const; virtual void Detach(void) const; }; ///////////////////////////////////////////////////////////////////////////////