L L4D2node

CUtlSymbol::String

0x00b82680 · 167 bytes · __thiscall

_ZNK10CUtlSymbol6StringEv

Decompiled

undefined (1 param)

/* CUtlSymbol::String() const */

undefined1 * __thiscall CUtlSymbol::String(CUtlSymbol *this)

{
  pthread_mutex_t *__mutex;
  int *piVar1;
  int iVar2;
  ushort uVar3;
  int iVar4;
  undefined1 *puVar5;
  
  uVar3 = *(ushort *)this;
  Initialize();
  iVar4 = s_pSymbolTable;
  __mutex = (pthread_mutex_t *)(s_pSymbolTable + 0x38);
  pthread_mutex_lock(__mutex);
  if (*(int *)(iVar4 + 0x104) != 0) {
    CThreadRWLock::WaitForRead();
  }
  *(int *)(iVar4 + 0x108) = *(int *)(iVar4 + 0x108) + 1;
  pthread_mutex_unlock(__mutex);
  if (uVar3 == 0xffff) {
    puVar5 = &DAT_00d539c2;
  }
  else {
    iVar2 = *(int *)(iVar4 + 4) + (uint)uVar3 * 0xc;
    puVar5 = (undefined1 *)
             ((uint)*(ushort *)(iVar2 + 10) +
              *(int *)(*(int *)(iVar4 + 0x24) + (uint)*(ushort *)(iVar2 + 8) * 4) + 10);
  }
  pthread_mutex_lock(__mutex);
  piVar1 = (int *)(iVar4 + 0x108);
  *piVar1 = *piVar1 + -1;
  if ((*piVar1 == 0) && (*(int *)(iVar4 + 0x104) != 0)) {
    CThreadEvent::Set();
  }
  pthread_mutex_unlock(__mutex);
  return puVar5;
}

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)