CResponseSystem::PushScript
0x005b4d80 · 297 bytes · __thiscall
_ZN15CResponseSystem10PushScriptEPKcPh
Decompiled
undefined (3 params)
/* CResponseSystem::PushScript(char const*, unsigned char*) */
void __thiscall CResponseSystem::PushScript(CResponseSystem *this,char *param_1,uchar *param_2)
{
undefined4 uVar1;
int iVar2;
undefined4 *puVar3;
int iVar4;
int iVar5;
int iVar6;
uVar1 = (**(code **)(*filesystem + 0x94))(filesystem,param_1);
iVar6 = *(int *)(this + 0x3d8c);
iVar4 = *(int *)(this + 0x3d84);
iVar5 = iVar6 + 1;
if (iVar4 < iVar5) {
iVar2 = *(int *)(this + 0x3d88);
if (-1 < iVar2) {
if (iVar2 == 0) {
if (iVar4 == 0) {
if (iVar5 < 3) {
iVar2 = 2;
goto LAB_005b4e3f;
}
iVar4 = 2;
}
do {
iVar2 = iVar4 * 2;
if (iVar5 <= iVar2) break;
iVar2 = iVar4 * 4;
iVar4 = iVar2;
} while (iVar2 < iVar5);
}
else {
for (iVar2 = (iVar6 / iVar2 + 1) * iVar2; iVar2 < iVar5; iVar2 = (iVar2 + iVar5) / 2) {
}
}
LAB_005b4e3f:
*(int *)(this + 0x3d84) = iVar2;
if (*(void **)(this + 0x3d80) == (void *)0x0) {
puVar3 = malloc(iVar2 << 4);
*(undefined4 **)(this + 0x3d80) = puVar3;
}
else {
puVar3 = realloc(*(void **)(this + 0x3d80),iVar2 << 4);
iVar6 = *(int *)(this + 0x3d8c);
*(undefined4 **)(this + 0x3d80) = puVar3;
iVar5 = iVar6 + 1;
}
goto LAB_005b4dbf;
}
}
puVar3 = *(undefined4 **)(this + 0x3d80);
LAB_005b4dbf:
*(int *)(this + 0x3d8c) = iVar5;
*(undefined4 **)(this + 0x3d90) = puVar3;
if (0 < iVar6) {
_V_memmove(puVar3 + 4,puVar3,iVar6 << 4);
puVar3 = *(undefined4 **)(this + 0x3d80);
}
if (puVar3 != (undefined4 *)0x0) {
puVar3[3] = 0;
*puVar3 = param_2;
puVar3[2] = param_2;
puVar3[1] = uVar1;
}
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.