- Status
- Offline
- Joined
- Jun 6, 2019
- Messages
- 6
- Reaction score
- 5
Hook function DrawSetColor - 15 index in ISurface, in argument int r, int g, int b, int a
It's code drop
It's code drop
C++:
void __stdcall Hooks::DrawSetColor(int r, int g, int b, int a)
{
static auto oDrawSetColor = pVGuiSurfaceHook.get_original<DrawSetColor_t>(index::DrawSetColor);
const auto ret_addr = uintptr_t(_ReturnAddress());
static auto arc_ret_addr = Utils::PatternScan("client_panorama.dll", "6A 00 FF 50 3C 8B 0D ? ? ? ? FF B7 ? ? ? ?") + 0x5;
static auto lens_ret_addr = Utils::PatternScan("client_panorama.dll", "FF 50 3C 8B 4C 24 20") + 0x3;
if (ret_addr == arc_ret_addr || ret_addr == lens_ret_addr)
return oDrawSetColor(g_VGuiSurface, r, g, b, 0);
oDrawSetColor(g_VGuiSurface, r, g, b, a);
}