CUtlSymbol::String
0x00050750 · 167 bytes · __thiscall
_ZNK10CUtlSymbol6StringEv
Decompiled
undefined (1 param)
/* CUtlSymbol::String() const */
undefined * __thiscall CUtlSymbol::String(CUtlSymbol *this)
{
pthread_mutex_t *__mutex;
int *piVar1;
int iVar2;
ushort uVar3;
int iVar4;
undefined *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_000b2b65;
}
else {
iVar2 = *(int *)(iVar4 + 4) + (uint)uVar3 * 0xc;
puVar5 = (undefined *)
((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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.