GCSDK::CSchema::AddIndexToFieldNumber
0x0008ec00 · 605 bytes · __thiscall
_ZN5GCSDK7CSchema21AddIndexToFieldNumberEiPKc
Decompiled
undefined (3 params)
/* GCSDK::CSchema::AddIndexToFieldNumber(int, char const*) */
undefined4 __thiscall GCSDK::CSchema::AddIndexToFieldNumber(CSchema *this,int param_1,char *param_2)
{
uint *puVar1;
char *pcVar2;
int iVar3;
undefined4 uVar4;
int iVar5;
int in_GS_OFFSET;
int local_e4 [5];
int local_d0 [5];
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
undefined4 local_b0;
undefined4 local_ac;
undefined1 local_a8;
undefined1 local_a7;
undefined4 local_a4;
char local_a0 [128];
int local_20;
pcVar2 = param_2;
local_e4[0] = 0;
local_e4[1] = 0;
local_e4[2] = 0;
local_e4[3] = 0;
local_e4[4] = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
puVar1 = (uint *)(param_1 * 0x118 + *(int *)(this + 0x88) + 0x110);
*puVar1 = *puVar1 | 1;
/* try { // try from 0008ec83 to 0008ec87 has its CatchHandler @ 0008ee8f */
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)local_e4,0,¶m_1);
iVar3 = local_e4[3];
local_d0[0] = 0;
local_d0[1] = 0;
local_d0[2] = 0;
local_d0[3] = 0;
local_d0[4] = 0;
local_bc = 0;
local_b8 = 0;
local_b4 = 0;
local_b0 = 0;
local_ac = 0;
local_a8 = 0;
local_a7 = 0;
if (local_e4[3] != 0) {
CUtlVector<int,CUtlMemory<int,int>>::GrowVector
((CUtlVector<int,CUtlMemory<int,int>> *)local_d0,local_e4[3]);
/* try { // try from 0008ee21 to 0008ee25 has its CatchHandler @ 0008ee93 */
CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsRight
((CUtlVector<int,CUtlMemory<int,int>> *)local_d0,0,iVar3);
if (0 < iVar3) {
iVar5 = 0;
do {
*(undefined4 *)(local_d0[0] + iVar5 * 4) = *(undefined4 *)(local_e4[0] + iVar5 * 4);
iVar5 = iVar5 + 1;
} while (iVar5 != iVar3);
}
}
local_a4 = 0;
if (pcVar2 == (char *)0x0) {
local_a0[0] = '\0';
}
else {
/* try { // try from 0008ed41 to 0008ed45 has its CatchHandler @ 0008ee93 */
V_strncpy(local_a0,pcVar2,0x80);
}
/* try { // try from 0008ed5a to 0008ed5e has its CatchHandler @ 0008ee61 */
uVar4 = CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>>::InsertBefore
((CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>> *)
(this + 0x9c),*(int *)(this + 0xa8),(FieldSet_t *)local_d0);
local_b0 = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_bc);
local_ac = local_bc;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_bc);
local_d0[3] = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_d0);
local_d0[4] = local_d0[0];
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_d0);
local_e4[3] = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_e4);
local_e4[4] = local_e4[0];
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_e4);
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
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.