Int_Decode
0x00145f60 · 638 bytes · __cdecl
_Z10Int_DecodeP10DecodeInfo
Decompiled
undefined (1 param)
/* Int_Decode(DecodeInfo*) */
void Int_Decode(DecodeInfo *param_1)
{
int iVar1;
int iVar2;
uint uVar3;
uint *puVar4;
undefined4 *puVar5;
byte bVar6;
int iVar7;
int iVar8;
uint uVar9;
uint uVar10;
byte local_28;
byte local_20;
iVar7 = *(int *)(param_1 + 0x24);
if ((*(uint *)(iVar7 + 0x3c) & 1) == 0) {
iVar7 = *(int *)(iVar7 + 0xc);
iVar1 = *(int *)(param_1 + 0x28);
iVar2 = *(int *)(iVar1 + 0x14);
uVar3 = *(uint *)(iVar1 + 0x10);
bVar6 = (byte)iVar7;
if (iVar2 < iVar7) {
puVar4 = *(uint **)(iVar1 + 0x18);
iVar8 = 0;
if (puVar4 == *(uint **)(iVar1 + 0x1c)) {
*(undefined4 *)(iVar1 + 0x14) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
*(undefined1 *)(iVar1 + 4) = 1;
}
else if (puVar4 < *(uint **)(iVar1 + 0x1c)) {
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
uVar10 = *puVar4;
*(uint *)(iVar1 + 0x10) = uVar10;
if (*(char *)(iVar1 + 4) == '\0') {
iVar7 = iVar7 - iVar2;
local_20 = (byte)iVar2;
uVar9 = ((&CBitBuffer::s_nMaskTable)[iVar7] & uVar10) << (local_20 & 0x1f) | uVar3;
*(int *)(iVar1 + 0x14) = 0x20 - iVar7;
local_28 = (byte)iVar7;
uVar10 = uVar10 >> (local_28 & 0x1f);
LAB_0014604c:
*(uint *)(iVar1 + 0x10) = uVar10;
iVar8 = (int)(uVar9 << (0x20 - bVar6 & 0x1f)) >> (0x20 - bVar6 & 0x1f);
}
}
else {
*(undefined1 *)(iVar1 + 4) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
}
}
else {
uVar9 = (&CBitBuffer::s_nMaskTable)[iVar7] & uVar3;
*(int *)(iVar1 + 0x14) = iVar2 - iVar7;
if (iVar2 - iVar7 == 0) {
puVar4 = *(uint **)(iVar1 + 0x18);
*(undefined4 *)(iVar1 + 0x14) = 0x20;
if (puVar4 == *(uint **)(iVar1 + 0x1c)) {
*(undefined4 *)(iVar1 + 0x14) = 1;
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
iVar8 = (int)(uVar9 << (0x20 - bVar6 & 0x1f)) >> (0x20 - bVar6 & 0x1f);
}
else {
if (puVar4 <= *(uint **)(iVar1 + 0x1c)) {
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
uVar10 = *puVar4;
goto LAB_0014604c;
}
*(undefined1 *)(iVar1 + 4) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
iVar8 = (int)(uVar9 << (0x20 - bVar6 & 0x1f)) >> (0x20 - bVar6 & 0x1f);
}
}
else {
*(uint *)(iVar1 + 0x10) = uVar3 >> (bVar6 & 0x1f);
iVar8 = (int)(uVar9 << (0x20 - bVar6 & 0x1f)) >> (0x20 - bVar6 & 0x1f);
}
}
*(int *)(param_1 + 4) = iVar8;
goto LAB_001460f3;
}
iVar7 = *(int *)(iVar7 + 0xc);
iVar1 = *(int *)(param_1 + 0x28);
iVar2 = *(int *)(iVar1 + 0x14);
uVar3 = *(uint *)(iVar1 + 0x10);
if (iVar2 < iVar7) {
puVar4 = *(uint **)(iVar1 + 0x18);
if (puVar4 == *(uint **)(iVar1 + 0x1c)) {
*(undefined4 *)(iVar1 + 0x14) = 1;
uVar9 = 0;
*(undefined4 *)(iVar1 + 0x10) = 0;
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
*(undefined1 *)(iVar1 + 4) = 1;
}
else {
if (puVar4 < *(uint **)(iVar1 + 0x1c)) {
*(uint **)(iVar1 + 0x18) = puVar4 + 1;
uVar10 = *puVar4;
*(uint *)(iVar1 + 0x10) = uVar10;
if (*(char *)(iVar1 + 4) == '\0') {
iVar7 = iVar7 - iVar2;
uVar9 = ((&CBitBuffer::s_nMaskTable)[iVar7] & uVar10) << ((byte)iVar2 & 0x1f) | uVar3;
*(int *)(iVar1 + 0x14) = 0x20 - iVar7;
*(uint *)(iVar1 + 0x10) = uVar10 >> ((byte)iVar7 & 0x1f);
goto LAB_001460f0;
}
}
else {
*(undefined1 *)(iVar1 + 4) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
}
uVar9 = 0;
}
}
else {
uVar9 = (&CBitBuffer::s_nMaskTable)[iVar7];
*(int *)(iVar1 + 0x14) = iVar2 - iVar7;
uVar9 = uVar9 & uVar3;
if (iVar2 - iVar7 == 0) {
puVar5 = *(undefined4 **)(iVar1 + 0x18);
*(undefined4 *)(iVar1 + 0x14) = 0x20;
if (puVar5 == *(undefined4 **)(iVar1 + 0x1c)) {
*(undefined4 *)(iVar1 + 0x14) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
*(undefined4 **)(iVar1 + 0x18) = puVar5 + 1;
}
else if (*(undefined4 **)(iVar1 + 0x1c) < puVar5) {
*(undefined1 *)(iVar1 + 4) = 1;
*(undefined4 *)(iVar1 + 0x10) = 0;
}
else {
*(undefined4 **)(iVar1 + 0x18) = puVar5 + 1;
*(undefined4 *)(iVar1 + 0x10) = *puVar5;
}
}
else {
*(uint *)(iVar1 + 0x10) = uVar3 >> ((byte)iVar7 & 0x1f);
}
}
LAB_001460f0:
*(uint *)(param_1 + 4) = uVar9;
LAB_001460f3:
if (*(int *)param_1 != 0) {
(**(code **)(*(int *)param_1 + 0x20))
(param_1,*(undefined4 *)(param_1 + 0x1c),*(undefined4 *)(param_1 + 0x20));
}
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.