PackEntities_NetworkBackDoor
0x00205840 · 684 bytes · __cdecl
_Z28PackEntities_NetworkBackDooriPP11CGameClientP14CFrameSnapshot
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* PackEntities_NetworkBackDoor(int, CGameClient**, CFrameSnapshot*) */
void PackEntities_NetworkBackDoor(int param_1,CGameClient **param_2,CFrameSnapshot *param_3)
{
uint *puVar1;
char cVar2;
uint uVar3;
int iVar4;
CBaseEdict *this;
int iVar5;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_Plat_SetBenchmarkMode == 0) {
local_20 = 0;
}
else {
(**(code **)(_Plat_SetBenchmarkMode + 0x50))
(_Plat_SetBenchmarkMode,&local_34,0,0,0,0,"/data/src/engine/./sv_packedentities.cpp",
0x132,&PackEntities_NetworkBackDoor(int,CGameClient**,CFrameSnapshot*)::tm_fmt,
"(%s)%s","Networking","PackEntities_NetworkBackDoor");
local_20 = _Plat_SetBenchmarkMode;
}
iVar5 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00205a36 to 00205a96 has its CatchHandler @ 00205b16 */
if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
if ((char *)*_DAT_0040b030 != "PackEntities_NetworkBackDoor") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2c4118,(char *)0x0,0x2a6193);
}
puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
iVar5 = 0;
if (0 < *(int *)(param_3 + 0x14)) {
do {
uVar3 = (uint)*(ushort *)(*(int *)(param_3 + 0x10) + iVar5 * 2);
this = (CBaseEdict *)(uVar3 * 0x10 + DAT_003b8174);
iVar4 = *(int *)(uVar3 * 0xc + *(int *)(param_3 + 8));
/* try { // try from 0020599d to 002059d6 has its CatchHandler @ 00205af5 */
CLocalNetworkBackdoor::EntState
((int)g_pLocalNetworkBackdoor,uVar3,*(int *)(this + 4),*(SendTable **)(iVar4 + 0xc),
*(void **)(iVar4 + 4),SUB41(*(undefined4 *)(this + 0xc),0),
(bool)((byte)*(undefined4 *)this & 1));
*(uint *)this = *(uint *)this & 0xfffffefe;
iVar4 = CBaseEdict::GetChangeAccessor(this);
iVar5 = iVar5 + 1;
*(undefined2 *)(iVar4 + 2) = 0;
} while (iVar5 < *(int *)(param_3 + 0x14));
}
CLocalNetworkBackdoor::ProcessDormantEntities(g_pLocalNetworkBackdoor);
InvalidateSharedEdictChangeInfos();
iVar5 = _DAT_0040b9d4;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
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.