CAI_Expresser::ClearSpokeConcept
0x005d4a10 · 478 bytes · __thiscall
_ZN13CAI_Expresser17ClearSpokeConceptE11CAI_Concept
Decompiled
undefined (2 params)
/* CAI_Expresser::ClearSpokeConcept(CAI_Concept) */
void __thiscall CAI_Expresser::ClearSpokeConcept(CAI_Expresser *this,CAI_Concept *param_2)
{
char cVar1;
int iVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
int local_e4 [2];
AI_Response local_dc [188];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = CAI_Concept::GetStringConcept(param_2);
if (iVar2 != 0) {
local_e4[1] = 0xbf800000;
AI_Response::AI_Response(local_dc);
iVar4 = *(int *)(this + 0x18);
local_e4[0] = iVar2;
if (iVar4 != -1) {
iVar2 = *(int *)(this + 0xc);
do {
while( true ) {
iVar3 = iVar4 * 0xd4;
/* try { // try from 005d4a9f to 005d4abd has its CatchHandler @ 005d4c01 */
cVar1 = (**(code **)(this + 8))(local_e4,iVar2 + 0x10 + iVar3);
if (cVar1 != '\0') break;
cVar1 = (**(code **)(this + 8))(*(int *)(this + 0xc) + iVar3 + 0x10,local_e4);
if (cVar1 == '\0') {
AI_Response::~AI_Response(local_dc);
if (iVar4 != -1) {
free(*(void **)(*(int *)(this + 0xc) + 0x10 + iVar3));
CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Unlink((CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
*)(this + 8),iVar4);
AI_Response::~AI_Response((AI_Response *)(*(int *)(this + 0xc) + iVar3 + 0x18));
*(int *)(*(int *)(this + 0xc) + iVar3) = iVar4;
*(undefined4 *)(*(int *)(this + 0xc) + 4 + iVar3) = *(undefined4 *)(this + 0x20);
*(int *)(this + 0x1c) = *(int *)(this + 0x1c) + -1;
*(int *)(this + 0x20) = iVar4;
}
goto LAB_005d4aed;
}
if (CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
if (iVar2 != 0) {
CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_00f21f78 = 0xffffffff;
DAT_00f21f7c = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
}
iVar2 = *(int *)(this + 0xc);
iVar4 = *(int *)(iVar2 + 4 + iVar3);
if (iVar4 == -1) goto LAB_005d4adf;
}
if (CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
if (iVar2 != 0) {
CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_00f21f78 = 0xffffffff;
DAT_00f21f7c = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
}
iVar2 = *(int *)(this + 0xc);
iVar4 = *(int *)(iVar2 + iVar3);
} while (iVar4 != -1);
}
LAB_005d4adf:
AI_Response::~AI_Response(local_dc);
}
LAB_005d4aed:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.