CResponseSystem::ParseResponse_Then
0x005ba280 · 634 bytes · __cdecl
_ZN15CResponseSystem18ParseResponse_ThenER8ResponseR13ResponseGroupP17AI_ResponseParams
Decompiled
undefined (3 params)
/* CResponseSystem::ParseResponse_Then(Response&, ResponseGroup&, AI_ResponseParams*) */
void CResponseSystem::ParseResponse_Then
(Response *param_1,ResponseGroup *param_2,AI_ResponseParams *param_3)
{
int iVar1;
char cVar2;
undefined4 uVar3;
Response *__nptr;
int in_GS_OFFSET;
double dVar4;
char local_1020 [4096];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_1[0x3d7c] == (Response)0x0) {
if (0 < *(int *)(param_1 + 0x3d8c)) {
iVar1 = *(int *)(param_1 + 0x3d80);
uVar3 = RR_Parse(*(char **)(iVar1 + 8),(char *)(param_1 + 0x38c8));
*(undefined4 *)(iVar1 + 8) = uVar3;
*(int *)(*(int *)(param_1 + 0x3d80) + 0xc) = *(int *)(*(int *)(param_1 + 0x3d80) + 0xc) + 1;
if (*(int *)(*(int *)(param_1 + 0x3d80) + 8) != 0) goto LAB_005ba32d;
}
ResponseWarning((CResponseSystem *)param_1,"THEN token in response lacked any further info.\n");
goto LAB_005ba2fb;
}
param_1[0x3d7c] = (Response)0x0;
LAB_005ba32d:
__nptr = param_1 + 0x38c8;
uVar3 = ResponseCopyString((char *)__nptr);
*(undefined4 *)(param_2 + 0x3c) = uVar3;
if (param_1[0x3d7c] == (Response)0x0) {
if (0 < *(int *)(param_1 + 0x3d8c)) {
iVar1 = *(int *)(param_1 + 0x3d80);
uVar3 = RR_Parse(*(char **)(iVar1 + 8),(char *)__nptr);
*(undefined4 *)(iVar1 + 8) = uVar3;
*(int *)(*(int *)(param_1 + 0x3d80) + 0xc) = *(int *)(*(int *)(param_1 + 0x3d80) + 0xc) + 1;
if (*(int *)(*(int *)(param_1 + 0x3d80) + 8) != 0) goto LAB_005ba3af;
uVar3 = *(undefined4 *)(param_2 + 0x3c);
}
ResponseWarning((CResponseSystem *)param_1,
"THEN token in response had a target \'%s\', but lacked any further info.\n",
uVar3);
goto LAB_005ba2fb;
}
param_1[0x3d7c] = (Response)0x0;
LAB_005ba3af:
uVar3 = ResponseCopyString((char *)__nptr);
*(undefined4 *)(param_2 + 0x30) = uVar3;
if (param_1[0x3d7c] == (Response)0x0) {
if (0 < *(int *)(param_1 + 0x3d8c)) {
iVar1 = *(int *)(param_1 + 0x3d80);
uVar3 = RR_Parse(*(char **)(iVar1 + 8),(char *)__nptr);
*(undefined4 *)(iVar1 + 8) = uVar3;
*(int *)(*(int *)(param_1 + 0x3d80) + 0xc) = *(int *)(*(int *)(param_1 + 0x3d80) + 0xc) + 1;
if (*(int *)(*(int *)(param_1 + 0x3d80) + 8) != 0) goto LAB_005ba40d;
}
ResponseWarning((CResponseSystem *)param_1,"THEN token in response lacked contexts.\n");
}
else {
param_1[0x3d7c] = (Response)0x0;
LAB_005ba40d:
local_1020[0] = '\0';
LAB_005ba420:
cVar2 = TokenWaiting((CResponseSystem *)param_1);
if (cVar2 != '\0') {
while( true ) {
V_strncat(local_1020,(char *)__nptr,0x1000,-1);
if (param_1[0x3d7c] != (Response)0x0) break;
if (*(int *)(param_1 + 0x3d8c) < 1) goto LAB_005ba420;
iVar1 = *(int *)(param_1 + 0x3d80);
uVar3 = RR_Parse(*(char **)(iVar1 + 8),(char *)__nptr);
*(undefined4 *)(iVar1 + 8) = uVar3;
*(int *)(*(int *)(param_1 + 0x3d80) + 0xc) = *(int *)(*(int *)(param_1 + 0x3d80) + 0xc) + 1;
cVar2 = TokenWaiting((CResponseSystem *)param_1);
if (cVar2 == '\0') goto LAB_005ba499;
}
param_1[0x3d7c] = (Response)0x0;
goto LAB_005ba420;
}
LAB_005ba499:
uVar3 = ResponseCopyString(local_1020);
*(undefined4 *)(param_2 + 0x34) = uVar3;
dVar4 = strtod((char *)__nptr,(char **)0x0);
*(float *)(param_2 + 0x38) = (float)dVar4;
}
LAB_005ba2fb:
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
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.