CDeltaBitsReader::ReadNextPropIndex
0x00141620 · 1525 bytes · __thiscall
_ZN16CDeltaBitsReader17ReadNextPropIndexEv
Decompiled
undefined (1 param)
/* CDeltaBitsReader::ReadNextPropIndex() */
int __thiscall CDeltaBitsReader::ReadNextPropIndex(CDeltaBitsReader *this)
{
undefined4 uVar1;
undefined4 *puVar2;
uint uVar3;
int iVar4;
uint *puVar5;
int iVar6;
int iVar7;
uint uVar8;
uint *puVar9;
uint uVar10;
uint local_1c;
uint local_14;
if (this[0xc] == (CDeltaBitsReader)0x0) {
iVar4 = *(int *)this;
iVar7 = *(int *)(iVar4 + 0x14);
uVar10 = *(uint *)(iVar4 + 0x10);
LAB_00141708:
if (6 < iVar7) {
LAB_001417d0:
*(int *)(iVar4 + 0x14) = iVar7 + -7;
uVar3 = uVar10 & 0x7f;
if (iVar7 + -7 == 0) {
puVar2 = *(undefined4 **)(iVar4 + 0x18);
*(undefined4 *)(iVar4 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(iVar4 + 0x1c)) {
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(iVar4 + 0x1c) < puVar2) {
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
else {
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
*(undefined4 *)(iVar4 + 0x10) = *puVar2;
}
}
else {
*(uint *)(iVar4 + 0x10) = uVar10 >> 7;
}
joined_r0x00141811:
uVar10 = uVar10 & 0x60;
if (uVar10 == 0x40) {
iVar7 = *(int *)(iVar4 + 0x14);
uVar10 = *(uint *)(iVar4 + 0x10);
if (iVar7 < 4) {
puVar9 = *(uint **)(iVar4 + 0x18);
if (puVar9 == *(uint **)(iVar4 + 0x1c)) {
LAB_00141be8:
*(undefined4 *)(iVar4 + 0x14) = 1;
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(undefined1 *)(iVar4 + 4) = 1;
}
else if (*(uint **)(iVar4 + 0x1c) < puVar9) {
LAB_001419f5:
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
else {
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
local_1c = *puVar9;
*(uint *)(iVar4 + 0x10) = local_1c;
if (*(char *)(iVar4 + 4) == '\0') {
local_14 = 4 - iVar7;
iVar6 = iVar7 + 0x1c;
uVar10 = (local_1c & (&CBitBuffer::s_nMaskTable)[local_14]) << ((byte)iVar7 & 0x1f) |
uVar10;
goto LAB_00141af6;
}
}
LAB_00141a02:
uVar3 = uVar3 & 0xffffff9f;
}
else {
*(int *)(iVar4 + 0x14) = iVar7 + -4;
uVar8 = uVar10 & 0xf;
if (iVar7 + -4 == 0) {
LAB_0014179e:
uVar3 = uVar3 & 0xffffff9f;
puVar2 = *(undefined4 **)(iVar4 + 0x18);
*(undefined4 *)(iVar4 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(iVar4 + 0x1c)) {
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
uVar3 = uVar3 | uVar8 << 5;
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(iVar4 + 0x1c) < puVar2) {
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
uVar3 = uVar3 | uVar8 << 5;
}
else {
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
uVar3 = uVar3 | uVar8 << 5;
*(undefined4 *)(iVar4 + 0x10) = *puVar2;
}
}
else {
*(uint *)(iVar4 + 0x10) = uVar10 >> 4;
uVar3 = uVar3 & 0xffffff9f | uVar8 << 5;
}
}
}
else if (uVar10 == 0x60) {
iVar7 = *(int *)(iVar4 + 0x14);
uVar10 = *(uint *)(iVar4 + 0x10);
if (iVar7 < 7) {
puVar9 = *(uint **)(iVar4 + 0x18);
if (puVar9 == *(uint **)(iVar4 + 0x1c)) goto LAB_00141be8;
if (*(uint **)(iVar4 + 0x1c) <= puVar9) goto LAB_001419f5;
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
local_1c = *puVar9;
*(uint *)(iVar4 + 0x10) = local_1c;
if (*(char *)(iVar4 + 4) != '\0') goto LAB_00141a02;
local_14 = 7 - iVar7;
iVar6 = iVar7 + 0x19;
uVar10 = (local_1c & (&CBitBuffer::s_nMaskTable)[local_14]) << ((byte)iVar7 & 0x1f) |
uVar10;
LAB_00141af6:
*(int *)(iVar4 + 0x14) = iVar6;
uVar3 = uVar3 & 0xffffff9f | uVar10 << 5;
*(uint *)(iVar4 + 0x10) = local_1c >> ((byte)local_14 & 0x1f);
}
else {
*(int *)(iVar4 + 0x14) = iVar7 + -7;
uVar8 = uVar10 & 0x7f;
if (iVar7 + -7 == 0) goto LAB_0014179e;
*(uint *)(iVar4 + 0x10) = uVar10 >> 7;
uVar3 = uVar3 & 0xffffff9f | uVar8 << 5;
}
}
else if (uVar10 == 0x20) {
iVar7 = *(int *)(iVar4 + 0x14);
uVar10 = *(uint *)(iVar4 + 0x10);
if (iVar7 < 2) {
puVar9 = *(uint **)(iVar4 + 0x18);
if (puVar9 == *(uint **)(iVar4 + 0x1c)) goto LAB_00141be8;
if (*(uint **)(iVar4 + 0x1c) <= puVar9) goto LAB_001419f5;
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
local_1c = *puVar9;
*(uint *)(iVar4 + 0x10) = local_1c;
if (*(char *)(iVar4 + 4) != '\0') goto LAB_00141a02;
local_14 = 2 - iVar7;
iVar6 = iVar7 + 0x1e;
uVar10 = (local_1c & (&CBitBuffer::s_nMaskTable)[local_14]) << ((byte)iVar7 & 0x1f) |
uVar10;
goto LAB_00141af6;
}
*(int *)(iVar4 + 0x14) = iVar7 + -2;
uVar8 = uVar10 & 3;
if (iVar7 + -2 == 0) goto LAB_0014179e;
*(uint *)(iVar4 + 0x10) = uVar10 >> 2;
uVar3 = uVar3 & 0xffffff9f | uVar8 << 5;
}
goto LAB_001416e0;
}
LAB_00141711:
puVar9 = *(uint **)(iVar4 + 0x18);
if (puVar9 == *(uint **)(iVar4 + 0x1c)) {
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
*(undefined1 *)(iVar4 + 4) = 1;
}
else if (puVar9 < *(uint **)(iVar4 + 0x1c)) {
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
uVar8 = *puVar9;
*(uint *)(iVar4 + 0x10) = uVar8;
if (*(char *)(iVar4 + 4) == '\0') {
uVar3 = (&CBitBuffer::s_nMaskTable)[7 - iVar7];
uVar1 = *(undefined4 *)(iVar4 + 0x14);
*(int *)(iVar4 + 0x14) = iVar7 + 0x19;
local_14._0_1_ = (byte)(7 - iVar7);
uVar3 = (uVar8 & uVar3) << ((byte)uVar1 & 0x1f) | uVar10;
*(uint *)(iVar4 + 0x10) = uVar8 >> ((byte)local_14 & 0x1f);
uVar10 = uVar3;
goto joined_r0x00141811;
}
}
else {
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
uVar3 = 0;
}
else {
iVar7 = *(int *)this;
uVar10 = *(uint *)(iVar7 + 0x10);
iVar4 = *(int *)(iVar7 + 0x14) + -1;
*(int *)(iVar7 + 0x14) = iVar4;
if (iVar4 == 0) {
puVar2 = *(undefined4 **)(iVar7 + 0x18);
*(undefined4 *)(iVar7 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(iVar7 + 0x1c)) {
*(undefined4 *)(iVar7 + 0x14) = 1;
*(undefined4 *)(iVar7 + 0x10) = 0;
*(undefined4 **)(iVar7 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(iVar7 + 0x1c) < puVar2) {
*(undefined1 *)(iVar7 + 4) = 1;
*(undefined4 *)(iVar7 + 0x10) = 0;
}
else {
*(undefined4 **)(iVar7 + 0x18) = puVar2 + 1;
*(undefined4 *)(iVar7 + 0x10) = *puVar2;
}
}
else {
*(uint *)(iVar7 + 0x10) = uVar10 >> 1;
}
if ((uVar10 & 1) != 0) {
iVar4 = *(int *)(this + 8);
*(int *)(this + 8) = iVar4 + 1;
return iVar4 + 1;
}
iVar4 = *(int *)this;
if (this[0xc] == (CDeltaBitsReader)0x0) {
iVar7 = *(int *)(iVar4 + 0x14);
uVar10 = *(uint *)(iVar4 + 0x10);
goto LAB_00141708;
}
iVar7 = *(int *)(iVar4 + 0x14) + -1;
*(int *)(iVar4 + 0x14) = iVar7;
uVar3 = *(uint *)(iVar4 + 0x10) & 1;
if (iVar7 == 0) {
puVar9 = *(uint **)(iVar4 + 0x18);
*(undefined4 *)(iVar4 + 0x14) = 0x20;
puVar5 = *(uint **)(iVar4 + 0x1c);
if (puVar9 != puVar5) {
if (puVar5 < puVar9) {
*(undefined1 *)(iVar4 + 4) = 1;
uVar10 = 0;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
else {
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
uVar10 = *puVar9;
*(uint *)(iVar4 + 0x10) = uVar10;
}
iVar7 = 0x20;
if (uVar3 != 0) goto LAB_001416c0;
goto LAB_001417d0;
}
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
if (uVar3 != 0) {
iVar7 = 1;
local_14 = 0;
goto LAB_001418c4;
}
uVar10 = 0;
iVar7 = 1;
goto LAB_00141711;
}
uVar10 = *(uint *)(iVar4 + 0x10) >> 1;
*(uint *)(iVar4 + 0x10) = uVar10;
if (uVar3 == 0) goto LAB_00141708;
if (iVar7 < 3) {
puVar5 = *(uint **)(iVar4 + 0x1c);
local_14 = uVar10;
LAB_001418c4:
puVar9 = *(uint **)(iVar4 + 0x18);
if (puVar9 == puVar5) {
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(uint **)(iVar4 + 0x18) = puVar5 + 1;
*(undefined1 *)(iVar4 + 4) = 1;
}
else if (puVar5 < puVar9) {
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
else {
*(uint **)(iVar4 + 0x18) = puVar9 + 1;
uVar10 = *puVar9;
*(uint *)(iVar4 + 0x10) = uVar10;
if (*(char *)(iVar4 + 4) == '\0') {
uVar1 = *(undefined4 *)(iVar4 + 0x14);
uVar3 = (&CBitBuffer::s_nMaskTable)[3 - iVar7];
*(int *)(iVar4 + 0x14) = iVar7 + 0x1d;
uVar3 = (uVar10 & uVar3) << ((byte)uVar1 & 0x1f) | local_14;
*(uint *)(iVar4 + 0x10) = uVar10 >> ((byte)(3 - iVar7) & 0x1f);
goto LAB_001416e0;
}
}
iVar4 = 1;
goto LAB_00141913;
}
LAB_001416c0:
*(int *)(iVar4 + 0x14) = iVar7 + -3;
uVar3 = uVar10 & 7;
if (iVar7 + -3 == 0) {
puVar2 = *(undefined4 **)(iVar4 + 0x18);
*(undefined4 *)(iVar4 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(iVar4 + 0x1c)) {
*(undefined4 *)(iVar4 + 0x14) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(iVar4 + 0x1c) < puVar2) {
*(undefined1 *)(iVar4 + 4) = 1;
*(undefined4 *)(iVar4 + 0x10) = 0;
}
else {
*(undefined4 **)(iVar4 + 0x18) = puVar2 + 1;
*(undefined4 *)(iVar4 + 0x10) = *puVar2;
}
}
else {
*(uint *)(iVar4 + 0x10) = uVar10 >> 3;
}
LAB_001416e0:
if (uVar3 == 0xfff) {
this[4] = (CDeltaBitsReader)0x1;
return -1;
}
}
iVar4 = uVar3 + 1;
LAB_00141913:
iVar7 = *(int *)(this + 8);
*(int *)(this + 8) = iVar4 + iVar7;
return iVar4 + iVar7;
}
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.