L L4D2node

CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>>::Release

0x006cd0a0 · 76 bytes · __thiscall

_ZN12CRefCounted1I11IRefCounted20CRefCountServiceBaseILb1E6CRefMTEE7ReleaseEv

Decompiled

undefined (1 param)

/* CRefCounted1<IRefCounted, CRefCountServiceBase<true, CRefMT> >::Release() */

int __thiscall
CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>>::Release
          (CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *this)

{
  CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *pCVar1;
  int iVar2;
  char cVar3;
  
  LOCK();
  pCVar1 = this + 8;
  iVar2 = *(int *)pCVar1;
  *(int *)pCVar1 = *(int *)pCVar1 + -1;
  UNLOCK();
  if (iVar2 + -1 == 0) {
    pCVar1 = this + 4;
    cVar3 = (**(code **)(*(int *)(this + 4) + 8))(pCVar1);
    if ((cVar3 != '\0') &&
       (pCVar1 != (CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *)0x0)) {
      (**(code **)(*(int *)(this + 4) + 4))(pCVar1);
      return 0;
    }
  }
  return iVar2 + -1;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)