GCSDK::CSchemaFull::AddRenameTable
0x000892d0 · 324 bytes · __thiscall
_ZN5GCSDK11CSchemaFull14AddRenameTableEPKcS2_
Decompiled
undefined (3 params)
/* GCSDK::CSchemaFull::AddRenameTable(char const*, char const*) */
void __thiscall GCSDK::CSchemaFull::AddRenameTable(CSchemaFull *this,char *param_1,char *param_2)
{
int iVar1;
undefined4 uVar2;
int iVar3;
void *pvVar4;
int iVar5;
int iVar6;
char *pcVar7;
iVar1 = *(int *)(this + 0x7c);
iVar5 = *(int *)(this + 0x74);
iVar6 = iVar1 + 1;
if (iVar5 < iVar6) {
iVar3 = *(int *)(this + 0x78);
if (-1 < iVar3) {
if (iVar3 == 0) {
if (iVar5 == 0) {
if (iVar6 < 2) {
iVar3 = 1;
goto LAB_0008936f;
}
iVar5 = 1;
}
do {
iVar3 = iVar5 * 2;
if (iVar6 <= iVar3) break;
iVar3 = iVar5 * 4;
iVar5 = iVar3;
} while (iVar3 < iVar6);
}
else {
for (iVar3 = (iVar1 / iVar3 + 1) * iVar3; iVar3 < iVar6; iVar3 = (iVar3 + iVar6) / 2) {
}
}
LAB_0008936f:
*(int *)(this + 0x74) = iVar3;
if (*(void **)(this + 0x70) == (void *)0x0) {
pvVar4 = malloc(iVar3 * 0x84);
*(void **)(this + 0x70) = pvVar4;
}
else {
pvVar4 = realloc(*(void **)(this + 0x70),iVar3 * 0x84);
*(void **)(this + 0x70) = pvVar4;
iVar6 = *(int *)(this + 0x7c) + 1;
}
goto LAB_000892ec;
}
}
pvVar4 = *(void **)(this + 0x70);
LAB_000892ec:
*(int *)(this + 0x7c) = iVar6;
iVar6 = (iVar6 - iVar1) + -1;
*(void **)(this + 0x80) = pvVar4;
if (0 < iVar6) {
_V_memmove((void *)((int)pvVar4 + iVar1 * 0x84 + 0x84),(void *)((int)pvVar4 + iVar1 * 0x84),
iVar6 * 0x84);
pvVar4 = *(void **)(this + 0x70);
}
pcVar7 = (char *)(iVar1 * 0x84 + (int)pvVar4);
V_strncpy(pcVar7,param_1,0x80);
uVar2 = FindITable(this,param_2);
*(undefined4 *)(pcVar7 + 0x80) = uVar2;
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.