Array_SkipProp
0x00148c20 · 319 bytes · __cdecl
_Z14Array_SkipPropPK8SendPropP7bf_read
Decompiled
undefined (2 params)
/* Array_SkipProp(SendProp const*, bf_read*) */
void Array_SkipProp(SendProp *param_1,bf_read *param_2)
{
int iVar1;
int iVar2;
uint *puVar3;
undefined4 *puVar4;
uint uVar5;
int iVar6;
uint uVar7;
uint local_20;
iVar1 = *(int *)(param_1 + 0x18);
iVar6 = SendProp::GetNumArrayLengthBits(param_1);
iVar2 = *(int *)(param_2 + 0x14);
if (iVar2 < iVar6) {
local_20 = *(uint *)(param_2 + 0x10);
puVar3 = *(uint **)(param_2 + 0x18);
if (puVar3 == *(uint **)(param_2 + 0x1c)) {
*(undefined4 *)(param_2 + 0x14) = 1;
*(undefined4 *)(param_2 + 0x10) = 0;
*(uint **)(param_2 + 0x18) = puVar3 + 1;
param_2[4] = (bf_read)0x1;
return;
}
if (*(uint **)(param_2 + 0x1c) < puVar3) {
param_2[4] = (bf_read)0x1;
*(undefined4 *)(param_2 + 0x10) = 0;
return;
}
*(uint **)(param_2 + 0x18) = puVar3 + 1;
uVar7 = *puVar3;
*(uint *)(param_2 + 0x10) = uVar7;
if (param_2[4] != (bf_read)0x0) {
return;
}
iVar6 = iVar6 - iVar2;
uVar5 = (&CBitBuffer::s_nMaskTable)[iVar6];
*(int *)(param_2 + 0x14) = 0x20 - iVar6;
*(uint *)(param_2 + 0x10) = uVar7 >> ((byte)iVar6 & 0x1f);
local_20 = (uVar5 & uVar7) << ((byte)iVar2 & 0x1f) | local_20;
}
else {
local_20 = (&CBitBuffer::s_nMaskTable)[iVar6];
*(int *)(param_2 + 0x14) = iVar2 - iVar6;
local_20 = local_20 & *(uint *)(param_2 + 0x10);
if (iVar2 - iVar6 == 0) {
puVar4 = *(undefined4 **)(param_2 + 0x18);
*(undefined4 *)(param_2 + 0x14) = 0x20;
if (puVar4 == *(undefined4 **)(param_2 + 0x1c)) {
*(undefined4 *)(param_2 + 0x14) = 1;
*(undefined4 *)(param_2 + 0x10) = 0;
*(undefined4 **)(param_2 + 0x18) = puVar4 + 1;
}
else if (*(undefined4 **)(param_2 + 0x1c) < puVar4) {
param_2[4] = (bf_read)0x1;
*(undefined4 *)(param_2 + 0x10) = 0;
}
else {
*(undefined4 **)(param_2 + 0x18) = puVar4 + 1;
*(undefined4 *)(param_2 + 0x10) = *puVar4;
}
}
else {
*(uint *)(param_2 + 0x10) = *(uint *)(param_2 + 0x10) >> ((byte)iVar6 & 0x1f);
}
}
if ((int)local_20 < 1) {
return;
}
uVar7 = 0;
do {
uVar7 = uVar7 + 1;
(**(code **)(g_PropTypeFns + *(int *)(iVar1 + 8) * 0x24 + 0x20))(iVar1,param_2);
} while (local_20 != uVar7);
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.