CUtlSymbolTable::Find
0x00263bf0 · 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 (_exit == 0) {
local_20 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_34,0,0,0,0,"/data/src/tier1/utlsymbol.cpp",0xe6,
&Find(char_const*)::tm_fmt,"(%s)%s","Unaccounted","CUtlSymbol::Find");
local_20 = _exit;
}
iVar4 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00263ca5 to 00263ca9 has its CatchHandler @ 00263f68 */
if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
if ((char *)*_DAT_0040b030 != "CUtlSymbol::Find") {
/* try { // try from 00263ee0 to 00263ef1 has its CatchHandler @ 00263f68 */
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2ccc28,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\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 00263cca to 00263d62 has its CatchHandler @ 00263f47 */
uVar2 = HashString(in_stack_0000000c);
}
else {
/* try { // try from 00263df8 to 00263dfc has its CatchHandler @ 00263f47 */
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_00263d87;
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_00341b9c = 0xffff;
DAT_00341b9e = 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_00263d82;
}
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_00341b9c = 0xffff;
CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341b9e = 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_00263d82:
uVar5 = 0xffff;
LAB_00263d87:
*(ushort *)param_1 = uVar5;
}
iVar4 = _DAT_0040b9d4;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
cVar1 = CVProfNode::ExitScope();
if (cVar1 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
return param_1;
}
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.