L L4D2node

CUtlSymbolTable::Find

0x00b81b90 · 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 (___atan2f_finite == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_34,0,0,0,0,"/data/src/tier1/utlsymbol.cpp",0xe6,
               &Find(char_const*)::tm_fmt,"(%s)%s","Unaccounted","CUtlSymbol::Find");
    local_20 = ___atan2f_finite;
  }
  iVar4 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 00b81c45 to 00b81c49 has its CatchHandler @ 00b81f08 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    if ((char *)*_DAT_0105d15c != "CUtlSymbol::Find") {
                    /* try { // try from 00b81e80 to 00b81e91 has its CatchHandler @ 00b81f08 */
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd542f8,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\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 00b81c6a to 00b81d02 has its CatchHandler @ 00b81ee7 */
      uVar2 = HashString(in_stack_0000000c);
    }
    else {
                    /* try { // try from 00b81d98 to 00b81d9c has its CatchHandler @ 00b81ee7 */
      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_00b81d27;
          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_00f6d1fc = 0xffff;
            DAT_00f6d1fe = 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_00b81d22;
        }
        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_00f6d1fc = 0xffff;
          CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f6d1fe = 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_00b81d22:
    uVar5 = 0xffff;
LAB_00b81d27:
    *(ushort *)param_1 = uVar5;
  }
  iVar4 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  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)