CDataManagerBase::MarkAsStale
0x00bdb760 · 279 bytes · __thiscall
_ZN16CDataManagerBase11MarkAsStaleEP13memhandle_t__
Decompiled
undefined (2 params)
/* CDataManagerBase::MarkAsStale(memhandle_t__*) */
void __thiscall CDataManagerBase::MarkAsStale(CDataManagerBase *this,memhandle_t__ *param_1)
{
ushort uVar1;
int iVar2;
int iVar3;
short *psVar4;
uint uVar5;
ushort uVar6;
(*(code *)**(undefined4 **)this)(this);
uVar5 = (uint)(param_1 + -1) & 0xffff;
if ((int)uVar5 < *(int *)(this + 0x3c)) {
psVar4 = (short *)(*(int *)(this + 0xc) + uVar5 * 0xc);
uVar6 = (ushort)(param_1 + -1);
if ((((uVar6 != psVar4[4]) || (uVar6 == psVar4[5])) &&
(psVar4[1] == (short)((uint)param_1 >> 0x10))) && ((uVar6 != 0xffff && (*psVar4 == 0)))) {
CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::Unlink
((CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short> *)
(this + 0xc),*(ushort *)(this + 0x44),uVar6);
uVar1 = *(ushort *)(this + 0x44);
CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::Unlink
((CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short> *)
(this + 0xc),uVar1,uVar6);
iVar3 = uVar5 * 0xc + *(int *)(this + 0xc);
*(undefined2 *)(iVar3 + 8) = 0xffff;
iVar2 = (uint)uVar1 * 10;
*(undefined2 *)(iVar3 + 10) = *(undefined2 *)(*(int *)(this + 0x18) + iVar2);
*(ushort *)(*(int *)(this + 0x18) + iVar2) = uVar6;
if (*(ushort *)(iVar3 + 10) == 0xffff) {
*(ushort *)(*(int *)(this + 0x18) + 2 + iVar2) = uVar6;
}
else {
*(ushort *)(*(int *)(this + 0xc) + (uint)*(ushort *)(iVar3 + 10) * 0xc + 8) = uVar6;
}
psVar4 = (short *)(iVar2 + *(int *)(this + 0x18) + 4);
*psVar4 = *psVar4 + 1;
if (*(int *)(this + 0x34) != 0) {
*(ushort *)(*(int *)(this + 0x34) + uVar5 * 2) = uVar1;
}
}
}
/* WARNING: Could not recover jumptable at 0x00bdb7b7. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 8))();
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.