RecvTable_Init(RecvTable**,int)::CPropVisitor::Visit_R
0x00150540 · 1409 bytes · __regparm3
_ZZ14RecvTable_InitPP9RecvTableiEN12CPropVisitor7Visit_RES0_
Decompiled
undefined (1 param)
/* Visit_R(RecvTable*) */
void __regparm3 RecvTable_Init(RecvTable**,int)::CPropVisitor::Visit_R(RecvTable *param_1)
{
RecvTable *pRVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
int iVar20;
RecvTable *local_40;
RecvTable *local_3c;
RecvTable *local_38;
RecvTable *local_34;
RecvTable *local_30;
RecvTable *local_2c;
RecvTable *local_28;
RecvTable *local_24;
RecvTable *local_20 [4];
if (param_1[0x11] == (RecvTable)0x0) {
local_40 = param_1;
if (*(int *)(param_1 + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",*(undefined4 *)(param_1 + 0xc));
}
local_40[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_40);
if (0 < *(int *)(local_40 + 4)) {
iVar3 = 0;
iVar13 = 0;
pRVar1 = local_40;
do {
while ((*(int *)(*(int *)pRVar1 + iVar3 + 4) != 6 ||
(local_3c = *(RecvTable **)(*(int *)pRVar1 + iVar3 + 0x28),
local_3c[0x11] != (RecvTable)0x0))) {
iVar13 = iVar13 + 1;
iVar3 = iVar3 + 0x3c;
if (*(int *)(pRVar1 + 4) <= iVar13) {
return;
}
}
if (*(int *)(local_3c + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",*(int *)(local_3c + 0xc));
}
local_3c[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_3c);
if (0 < *(int *)(local_3c + 4)) {
iVar14 = 0;
iVar4 = 0;
pRVar1 = local_3c;
do {
while ((*(int *)(*(int *)pRVar1 + iVar4 + 4) == 6 &&
(local_38 = *(RecvTable **)(*(int *)pRVar1 + iVar4 + 0x28),
local_38[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_38 + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",*(int *)(local_38 + 0xc)
);
}
local_38[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_38);
if (0 < *(int *)(local_38 + 4)) {
iVar15 = 0;
iVar5 = 0;
pRVar1 = local_38;
do {
while ((*(int *)(*(int *)pRVar1 + iVar5 + 4) == 6 &&
(local_34 = *(RecvTable **)(*(int *)pRVar1 + iVar5 + 0x28),
local_34[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_34 + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",
*(int *)(local_34 + 0xc));
}
local_34[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_34);
if (0 < *(int *)(local_34 + 4)) {
iVar16 = 0;
iVar6 = 0;
pRVar1 = local_34;
do {
while ((*(int *)(*(int *)pRVar1 + iVar6 + 4) == 6 &&
(local_30 = *(RecvTable **)(*(int *)pRVar1 + iVar6 + 0x28),
local_30[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_30 + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",
*(int *)(local_30 + 0xc));
}
local_30[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_30);
if (0 < *(int *)(local_30 + 4)) {
iVar17 = 0;
iVar7 = 0;
pRVar1 = local_30;
do {
while ((*(int *)(*(int *)pRVar1 + iVar7 + 4) == 6 &&
(local_2c = *(RecvTable **)(*(int *)pRVar1 + iVar7 + 0x28),
local_2c[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_2c + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",
*(int *)(local_2c + 0xc));
}
local_2c[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_2c);
if (0 < *(int *)(local_2c + 4)) {
iVar18 = 0;
iVar8 = 0;
pRVar1 = local_2c;
do {
while ((*(int *)(*(int *)pRVar1 + iVar18 + 4) == 6 &&
(local_28 = *(RecvTable **)
(*(int *)pRVar1 + iVar18 + 0x28),
local_28[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_28 + 8) != 0) {
Error("RecvTable_Init: table \'%s\' has a decoder already.",
*(int *)(local_28 + 0xc));
}
local_28[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_28);
if (0 < *(int *)(local_28 + 4)) {
iVar19 = 0;
iVar9 = 0;
pRVar1 = local_28;
do {
while ((*(int *)(*(int *)pRVar1 + iVar19 + 4) == 6 &&
(local_24 = *(RecvTable **)
(*(int *)pRVar1 + iVar19 + 0x28),
local_24[0x11] == (RecvTable)0x0))) {
if (*(int *)(local_24 + 8) != 0) {
Error(
"RecvTable_Init: table \'%s\' has a decoder already."
,*(int *)(local_24 + 0xc));
}
local_24[0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,&local_24);
if (0 < *(int *)(local_24 + 4)) {
iVar12 = 0;
iVar10 = 0;
pRVar1 = local_24;
do {
while ((*(int *)(*(int *)pRVar1 + iVar12 + 4) == 6
&& (local_20[0] = *(RecvTable **)
(*(int *)pRVar1 + iVar12 +
0x28),
local_20[0][0x11] == (RecvTable)0x0))) {
if (*(int *)(local_20[0] + 8) != 0) {
Error(
"RecvTable_Init: table \'%s\' has a decoder already."
,*(int *)(local_20[0] + 0xc));
}
local_20[0][0x11] = (RecvTable)0x1;
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
::InsertBefore((
CUtlLinkedList<RecvTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<RecvTable*,unsigned_short>,unsigned_short>>
*)&g_RecvTables,0xffff,local_20);
if (0 < *(int *)(local_20[0] + 4)) {
iVar20 = 0;
iVar11 = 0;
pRVar1 = local_20[0];
do {
while (iVar2 = *(int *)pRVar1 + iVar20,
*(int *)(iVar2 + 4) == 6) {
iVar11 = iVar11 + 1;
iVar20 = iVar20 + 0x3c;
Visit_R(*(RecvTable **)(iVar2 + 0x28));
pRVar1 = local_20[0];
if (*(int *)(local_20[0] + 4) <= iVar11)
goto LAB_001509db;
}
iVar11 = iVar11 + 1;
iVar20 = iVar20 + 0x3c;
} while (iVar11 < *(int *)(pRVar1 + 4));
}
LAB_001509db:
iVar10 = iVar10 + 1;
iVar12 = iVar12 + 0x3c;
pRVar1 = local_24;
if (*(int *)(local_24 + 4) <= iVar10)
goto LAB_001509f6;
}
iVar10 = iVar10 + 1;
iVar12 = iVar12 + 0x3c;
} while (iVar10 < *(int *)(pRVar1 + 4));
}
LAB_001509f6:
iVar9 = iVar9 + 1;
iVar19 = iVar19 + 0x3c;
pRVar1 = local_28;
if (*(int *)(local_28 + 4) <= iVar9) goto LAB_00150a16;
}
iVar9 = iVar9 + 1;
iVar19 = iVar19 + 0x3c;
} while (iVar9 < *(int *)(pRVar1 + 4));
}
LAB_00150a16:
iVar8 = iVar8 + 1;
iVar18 = iVar18 + 0x3c;
pRVar1 = local_2c;
if (*(int *)(local_2c + 4) <= iVar8) goto LAB_00150a36;
}
iVar8 = iVar8 + 1;
iVar18 = iVar18 + 0x3c;
} while (iVar8 < *(int *)(pRVar1 + 4));
}
LAB_00150a36:
iVar17 = iVar17 + 1;
iVar7 = iVar7 + 0x3c;
pRVar1 = local_30;
if (*(int *)(local_30 + 4) <= iVar17) goto LAB_00150a56;
}
iVar17 = iVar17 + 1;
iVar7 = iVar7 + 0x3c;
} while (iVar17 < *(int *)(pRVar1 + 4));
}
LAB_00150a56:
iVar16 = iVar16 + 1;
iVar6 = iVar6 + 0x3c;
pRVar1 = local_34;
if (*(int *)(local_34 + 4) <= iVar16) goto LAB_00150a76;
}
iVar16 = iVar16 + 1;
iVar6 = iVar6 + 0x3c;
} while (iVar16 < *(int *)(pRVar1 + 4));
}
LAB_00150a76:
iVar15 = iVar15 + 1;
iVar5 = iVar5 + 0x3c;
pRVar1 = local_38;
if (*(int *)(local_38 + 4) <= iVar15) goto LAB_00150a96;
}
iVar15 = iVar15 + 1;
iVar5 = iVar5 + 0x3c;
} while (iVar15 < *(int *)(pRVar1 + 4));
}
LAB_00150a96:
iVar14 = iVar14 + 1;
iVar4 = iVar4 + 0x3c;
pRVar1 = local_3c;
if (*(int *)(local_3c + 4) <= iVar14) goto LAB_00150ab6;
}
iVar14 = iVar14 + 1;
iVar4 = iVar4 + 0x3c;
} while (iVar14 < *(int *)(pRVar1 + 4));
}
LAB_00150ab6:
iVar13 = iVar13 + 1;
iVar3 = iVar3 + 0x3c;
pRVar1 = local_40;
} while (iVar13 < *(int *)(local_40 + 4));
}
}
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.