L L4D2node

CUtlSymbolTable::Find

0x0004fc60 · 815 bytes · __cdecl

_ZNK15CUtlSymbolTable4FindEPKc

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CUtlSymbolTable::Find(char const*) const */

char * CUtlSymbolTable::Find(char *param_1)

{
  char cVar1;
  undefined2 uVar2;
  int iVar3;
  int iVar4;
  ushort uVar5;
  CLess *in_stack_00000008;
  char *in_stack_0000000c;
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_vtable == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_vtable + 0x50))
              (_vtable,&local_34,0,0,0,0,"/data/src/tier1/utlsymbol.cpp",0xe6,
               &Find(char_const*)::tm_fmt,"(%s)%s","Unaccounted","CUtlSymbol::Find");
    local_20 = _vtable;
  }
  iVar4 = _DAT_000e89f8;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0004fd15 to 0004fd19 has its CatchHandler @ 0004ffd8 */
  if (((_DAT_000e804c != 0) || (DAT_000e8050 == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    if ((char *)*_DAT_000e8054 != "CUtlSymbol::Find") {
                    /* try { // try from 0004ff50 to 0004ff61 has its CatchHandler @ 0004ffd8 */
      _DAT_000e8054 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_000e8054,0xb3360,(char *)0x1,0xb3371);
    }
    CVProfNode::EnterScope();
    DAT_000e8050 = '\0';
  }
  if (in_stack_0000000c == (char *)0x0) {
    param_1[0] = -1;
    param_1[1] = -1;
  }
  else {
    *(char **)(in_stack_00000008 + 0x20) = in_stack_0000000c;
    if (in_stack_00000008[0x1c] == (CLess)0x0) {
                    /* try { // try from 0004fd3a to 0004fdd2 has its CatchHandler @ 0004ffb7 */
      uVar2 = HashString(in_stack_0000000c);
    }
    else {
                    /* try { // try from 0004fe68 to 0004fe6c has its CatchHandler @ 0004ffb7 */
      uVar2 = HashStringCaseless(in_stack_0000000c);
    }
    uVar5 = *(ushort *)(in_stack_00000008 + 0x10);
    *(undefined2 *)(in_stack_00000008 + 0x1e) = uVar2;
    local_38 = 0xffff;
    local_36 = 0xffff;
    if (uVar5 != 0xffff) {
      iVar4 = *(int *)(in_stack_00000008 + 4);
      do {
        while( true ) {
          iVar3 = (uint)uVar5 * 0xc;
          cVar1 = CLess::operator()(in_stack_00000008,(CStringPoolIndex *)&local_38,
                                    (CStringPoolIndex *)(iVar4 + 8 + iVar3));
          if (cVar1 != '\0') break;
          cVar1 = CLess::operator()(in_stack_00000008,
                                    (CStringPoolIndex *)
                                    (*(int *)(in_stack_00000008 + 4) + iVar3 + 8),
                                    (CStringPoolIndex *)&local_38);
          if (cVar1 == '\0') goto LAB_0004fdf7;
          if ((CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
               ::Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
                                           ::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
            CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
            ::Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_000d269c = 0xffff;
            DAT_000d269e = 0xffff;
            __cxa_guard_release(&CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
                                 ::Links(unsigned_short)::s_Sentinel);
          }
          iVar4 = *(int *)(in_stack_00000008 + 4);
          uVar5 = *(ushort *)(iVar4 + 2 + iVar3);
          if (uVar5 == 0xffff) goto LAB_0004fdf2;
        }
        if ((CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
             ::Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
                                         ::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          DAT_000d269c = 0xffff;
          CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d269e = 0xffff;
          __cxa_guard_release(&CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
                               ::Links(unsigned_short)::s_Sentinel);
        }
        iVar4 = *(int *)(in_stack_00000008 + 4);
        uVar5 = *(ushort *)(iVar4 + (uint)uVar5 * 0xc);
      } while (uVar5 != 0xffff);
    }
LAB_0004fdf2:
    uVar5 = 0xffff;
LAB_0004fdf7:
    *(ushort *)param_1 = uVar5;
  }
  iVar4 = _DAT_000e89f8;
  if (((DAT_000e8050 == '\0') || (_DAT_000e804c != 0)) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_000e8054 = (int *)_DAT_000e8054[0x19];
    }
    DAT_000e8050 = _DAT_000e8054 == (int *)0xe8058;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return param_1;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)