Welcome, Guest.

Author Topic: [ Reversing ] Find Globals Pointer on Source Engine Games  (Read 1814 times)

Offline KittoniuM

  • Administrator
  • *
  • Posts: 1272
    • View Profile
Find Globals Pointer on Source Engine Games
« on: August 21, 2018, 02:01:57 PM »

achievements/%s.vmt

here r some sigs in kitterengine

Code: [Select]
size_t GlobalsSigGmod = FindSignature("client.dll", "A1 ? ? ? ? C1 E6 08 03 B3 ? ? ? ?");
if (GlobalsSigGmod != 0)
{
s_Globals = **(CGlobals***)(GlobalsSigGmod + 1);
return;
}

size_t GlobalsSigBlackmesa = FindSignature("client.dll", "A1 ? ? ? ? F3 0F 10 40 ? 0F 2F 81 ? ? ? ? 72 03");
if (GlobalsSigBlackmesa != 0)
{
s_Globals = **(CGlobals***)(GlobalsSigBlackmesa + 1);
return;
}

size_t GlobalsSigSynergy = FindSignature("client.dll", "A1 ? ? ? ? F3 0F 10 40 ? 0F 2F C1 76 12");
if (GlobalsSigSynergy != 0)
{
s_Globals = **(CGlobals***)(GlobalsSigSynergy + 1);
return;
}

//"gameui_preventescapetoshow\n" above it is call to globals->curtime + 0.25
size_t GlobalsSigL4D1 = FindSignature("client.dll", "A1 ? ? ? ? 83 78 14 01 74 0C 8B 49 14 85 C9 74 05 E9 ? ? ? ?");
if (GlobalsSigL4D1 != 0)
{
s_Globals = **(CGlobals***)(GlobalsSigL4D1 + 1);
return;
}

Offline Kelse

  • Posts: 1
  • Source Engine guy
    • View Profile
Re: Find Globals Pointer on Source Engine Games
« Reply #1 on: August 22, 2018, 10:07:14 AM »
I personally prefer to use CHLClient->HudUpdate ( https://github.com/VSES/SourceEngine2007/blob/43a5c90a5ada1e69ca044595383be67f40b33c61/se2007/game/client/cdll_client_int.cpp#L903-L925 ) to grab globals.



Code: [Select]
CGlobals = **(CGlobalVarsBase***) (Util::FindPattern((DWORD)GetModuleHandleA("client.dll"), 0x7FFFFFFF, "\x8B\x0D????\xD8\x49\x0C") + 0x02);

The + 2 is an exercise for the reader to figure out, I suppose. ?\_(ツ)_/?


Total Registered Members:





2017-2023 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.