CAI_Expresser::GetTimeSpokeConcept
0x005d14c0 · 442 bytes · __thiscall
_ZN13CAI_Expresser19GetTimeSpokeConceptE11CAI_Concept
Decompiled
undefined (2 params)
/* CAI_Expresser::GetTimeSpokeConcept(CAI_Concept) */
longdouble __thiscall CAI_Expresser::GetTimeSpokeConcept(CAI_Expresser *this,CAI_Concept *param_2)
{
char cVar1;
int iVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
float fVar5;
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 005d154f to 005d156d has its CatchHandler @ 005d168c */
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) goto LAB_005d159d;
fVar5 = *(float *)(*(int *)(this + 0xc) + 0x14 + iVar3);
goto LAB_005d15a5;
}
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_005d158f;
}
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_005d158f:
AI_Response::~AI_Response(local_dc);
}
LAB_005d159d:
fVar5 = -1.0;
LAB_005d15a5:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return (longdouble)fVar5;
}
/* 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.