VOX_Touch
0x000f3e40 · 346 bytes · __cdecl
_Z9VOX_TouchPKcR8CUtlDictIiiE
Decompiled
undefined (2 params)
/* VOX_Touch(char const*, CUtlDict<int, int>&) */
void VOX_Touch(char *param_1,CUtlDict *param_2)
{
int iVar1;
char cVar2;
int iVar3;
int iVar4;
Node_t *local_34;
char *local_24 [5];
if (param_1 != (char *)0x0) {
iVar4 = *(int *)(param_2 + 0x10);
local_24[0] = param_1;
if (iVar4 != -1) {
iVar3 = *(int *)(param_2 + 4);
do {
iVar1 = iVar4 * 0x18;
cVar2 = (**(code **)param_2)(local_24,iVar3 + 0x10 + iVar1);
if (cVar2 == '\0') {
cVar2 = (**(code **)param_2)(*(int *)(param_2 + 4) + iVar1 + 0x10,local_24);
if (cVar2 == '\0') {
if (iVar4 != -1) {
return;
}
break;
}
if ((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel), iVar4 != 0)) {
CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_0034075c = 0xffffffff;
DAT_00340760 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
iVar3 = *(int *)(param_2 + 4);
iVar4 = *(int *)(iVar3 + 4 + iVar1);
}
else {
if ((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel), iVar3 != 0)) {
CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_0034075c = 0xffffffff;
DAT_00340760 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
iVar3 = *(int *)(param_2 + 4);
iVar4 = *(int *)(iVar3 + iVar4 * 0x18);
}
} while (iVar4 != -1);
}
}
local_34 = (Node_t *)local_24;
local_24[0] = strdup(param_1);
CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::Insert((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
*)param_2,local_34);
return;
}
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.