CAI_Expresser::SetSpokeConcept
0x005d3b00 · 640 bytes · __thiscall
_ZN13CAI_Expresser15SetSpokeConceptE11CAI_ConceptP11AI_Responseb
Decompiled
undefined (4 params)
/* CAI_Expresser::SetSpokeConcept(CAI_Concept, AI_Response*, bool) */
void __thiscall
CAI_Expresser::SetSpokeConcept
(CAI_Expresser *this,CAI_Concept *param_2,AI_Response *param_3,char param_4)
{
char cVar1;
int iVar2;
char *pcVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
undefined2 local_ec [2];
undefined4 local_e8;
int local_e4;
undefined4 local_e0;
AI_Response local_dc [188];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_e4 = CAI_Concept::GetStringConcept(param_2);
if (local_e4 != 0) {
local_e0 = 0xbf800000;
AI_Response::AI_Response(local_dc);
iVar4 = *(int *)(this + 0x18);
if (iVar4 != -1) {
iVar2 = *(int *)(this + 0xc);
do {
while( true ) {
iVar5 = iVar4 * 0xd4;
/* try { // try from 005d3ba7 to 005d3bc5 has its CatchHandler @ 005d3da3 */
cVar1 = (**(code **)(this + 8))(&local_e4,iVar2 + 0x10 + iVar5);
if (cVar1 != '\0') break;
cVar1 = (**(code **)(this + 8))(*(int *)(this + 0xc) + iVar5 + 0x10,&local_e4);
if (cVar1 == '\0') {
AI_Response::~AI_Response(local_dc);
if (iVar4 == -1) goto LAB_005d3bf5;
goto LAB_005d3c56;
}
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') &&
(iVar4 = __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), iVar4 != 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 + iVar5);
if (iVar4 == -1) goto LAB_005d3be7;
}
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') &&
(iVar4 = __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), iVar4 != 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 + iVar5);
} while (iVar4 != -1);
}
LAB_005d3be7:
AI_Response::~AI_Response(local_dc);
}
LAB_005d3bf5:
local_e4 = -0x40800000;
AI_Response::AI_Response((AI_Response *)&local_e0);
local_e4 = *(int *)(gpGlobals + 0xc);
/* try { // try from 005d3c28 to 005d3c45 has its CatchHandler @ 005d3d8c */
pcVar3 = (char *)CAI_Concept::GetStringConcept(param_2);
iVar5 = CUtlDict<ConceptHistory_t,int>::Insert
((CUtlDict<ConceptHistory_t,int> *)(this + 8),pcVar3,
(ConceptHistory_t *)&local_e4);
AI_Response::~AI_Response((AI_Response *)&local_e0);
iVar5 = iVar5 * 0xd4;
LAB_005d3c56:
iVar4 = *(int *)(this + 0xc);
*(undefined4 *)(iVar5 + iVar4 + 0x14) = *(undefined4 *)(gpGlobals + 0xc);
if (param_3 != (AI_Response *)0x0) {
AI_Response::operator=((AI_Response *)(iVar5 + iVar4 + 0x18),param_3);
}
if (param_4 != '\0') {
local_ec[0] = *(undefined2 *)param_2;
local_e8 = *(undefined4 *)(param_2 + 4);
(**(code **)**(undefined4 **)(this + 4))(*(undefined4 **)(this + 4),local_ec,param_3);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.