CBaseAnimatingOverlay::GetDemoRecordingState
0x005eeb20 · 840 bytes · __thiscall
_ZN21CBaseAnimatingOverlay21GetDemoRecordingStateEP9KeyValues
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseAnimatingOverlay::GetDemoRecordingState(KeyValues*) */
uint __thiscall
CBaseAnimatingOverlay::GetDemoRecordingState(CBaseAnimatingOverlay *this,KeyValues *param_1)
{
uint *puVar1;
undefined4 uVar2;
undefined4 uVar3;
byte bVar4;
char cVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
undefined4 *puVar10;
CBaseAnimatingOverlay *pCVar11;
uint uVar12;
byte bVar13;
int local_34;
undefined4 local_24;
undefined4 local_20;
bVar13 = 0;
local_24 = 0;
local_20 = 0;
if (_towlower == 0) {
local_34 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_24,0,0,0,0,"/data/src/game/server/baseanimatingoverlay.cpp",0x496,
&GetDemoRecordingState(KeyValues*)::tm_fmt,"(%s)%s","Tools",
"CBaseAnimatingOverlay::GetDemoRecordingState");
local_34 = _towlower;
}
uVar3 = local_20;
uVar2 = local_24;
iVar8 = _DAT_0105db00;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 005eed96 to 005eedf6 has its CatchHandler @ 005eee86 */
iVar7 = ThreadGetCurrentId();
if (iVar8 == iVar7) {
if ((char *)*_DAT_0105d15c != "CBaseAnimatingOverlay::GetDemoRecordingState") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc5aad4,(char *)0x0,0xc59908);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
/* try { // try from 005eebdd to 005eecf3 has its CatchHandler @ 005eeec3 */
bVar4 = CBaseAnimating::GetDemoRecordingState((CBaseAnimating *)this,param_1);
KeyValues::SetInt(param_1,"type",5);
if (GetDemoRecordingState(KeyValues*)::currentState == '\0') {
iVar8 = __cxa_guard_acquire(&GetDemoRecordingState(KeyValues*)::currentState);
if (iVar8 != 0) {
GetDemoRecordingState(KeyValues*)::currentState._0_1_ = 0;
_DAT_00fbe64c = 0;
__cxa_guard_release(&GetDemoRecordingState(KeyValues*)::currentState);
}
}
iVar8 = *(int *)(this + 0x1400);
if (0 < iVar8) {
iVar7 = 0;
iVar9 = *(int *)(this + 0x13f4);
do {
iVar6 = iVar7 + 0x20;
*(undefined4 *)((int)&DAT_00fbe464 + iVar7) = *(undefined4 *)(iVar9 + 0x14);
*(undefined4 *)((int)&DAT_00fbe468 + iVar7) = *(undefined4 *)(iVar9 + 8);
*(undefined4 *)(&DAT_00fbe46c + iVar7) = *(undefined4 *)(iVar9 + 0x10);
*(undefined4 *)(&DAT_00fbe470 + iVar7) = *(undefined4 *)(iVar9 + 0xc);
*(undefined4 *)(&DAT_00fbe474 + iVar7) = *(undefined4 *)(iVar9 + 0x3c);
*(undefined4 *)(&DAT_00fbe478 + iVar7) = *(undefined4 *)(iVar9 + 0x18);
*(undefined4 *)(&DAT_00fbe47c + iVar7) = *(undefined4 *)(iVar9 + 0x2c);
*(undefined4 *)(&DAT_00fbe480 + iVar7) = *(undefined4 *)(iVar9 + 0x30);
iVar7 = iVar6;
iVar9 = iVar9 + 0x4c;
} while (iVar6 != iVar8 << 5);
}
GetDemoRecordingState(KeyValues*)::currentState._0_1_ = (undefined1)iVar8;
if (this[0x10] == (CBaseAnimatingOverlay)0x0) {
/* try { // try from 005eee1c to 005eee20 has its CatchHandler @ 005eeec3 */
uVar12 = ServerDemoPacket_BaseAnimatingOverlay::CompareAndCacheModifiedFields
((ServerDemoPacket_BaseAnimatingOverlay *)(this + 0x1408),
(ServerDemoPacket_BaseAnimatingOverlay *)
&GetDemoRecordingState(KeyValues*)::currentState);
}
else {
puVar10 = &GetDemoRecordingState(KeyValues*)::currentState;
pCVar11 = this + 0x1408;
for (iVar8 = 0x7c; iVar8 != 0; iVar8 = iVar8 + -1) {
*(undefined4 *)pCVar11 = *puVar10;
puVar10 = puVar10 + (uint)bVar13 * -2 + 1;
pCVar11 = pCVar11 + (uint)bVar13 * -8 + 4;
}
uVar12 = 1;
*(undefined4 *)(this + 0x15ec) = 0xffffffff;
*(undefined4 *)(this + 0x15f0) = 0xffffffff;
}
KeyValues::SetPtr(param_1,"baseanimatingoverlay",this + 0x1408);
iVar8 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar7 = ThreadGetCurrentId();
if (iVar8 == iVar7) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_34 != 0) {
(**(code **)(local_34 + 0x54))(local_34,uVar2,uVar3,0,0,0);
}
return bVar4 | uVar12;
}
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.