L L4D2node

Decal_Shutdown

0x0012e550 · 387 bytes · unknown

_Z14Decal_Shutdownv

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Decal_Shutdown() */

void Decal_Shutdown(void)

{
  ushort uVar1;
  IMaterial *pIVar2;
  int iVar3;
  short *psVar4;
  ushort *puVar5;
  uint uVar6;
  
  uVar1 = g_DecalDictionary._16_2_;
  do {
    uVar6 = (uint)uVar1;
    if ((CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         ::Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                     ::Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      DAT_00340db6 = 0xffff;
      CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
      ::Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00340db8 = 0xffff;
      __cxa_guard_release(&CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                           ::Links(unsigned_short)::s_Sentinel);
      if (uVar1 == 0xffff) goto LAB_0012e610;
LAB_0012e57a:
      psVar4 = (short *)(g_DecalDictionary._4_4_ + uVar6 * 0x14);
    }
    else {
      if (uVar1 != 0xffff) goto LAB_0012e57a;
LAB_0012e610:
      psVar4 = &CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                ::Links(unsigned_short)::s_Sentinel;
    }
    if (*psVar4 == -1) {
      for (; uVar6 != 0xffff; uVar6 = uVar6 & 0xffff) {
        pIVar2 = *(IMaterial **)(g_DecalDictionary._4_4_ + uVar6 * 0x14 + 0xc);
        if (pIVar2 != (IMaterial *)0x0) {
          GL_UnloadMaterial(pIVar2);
        }
        uVar6 = CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                ::NextInorder((CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                               *)g_DecalDictionary,(ushort)uVar6);
      }
      _DAT_0039c66c = 0;
      CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&g_DecalLookup);
      _DAT_0039c670 = g_DecalLookup;
      CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
      ::RemoveAll((CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                   *)g_DecalDictionary);
      return;
    }
    if (CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel == '\0') {
      iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                   ::Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340db6 = 0xffff;
        DAT_00340db8 = 0xffff;
        __cxa_guard_release(&CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                             ::Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_0012e5ab;
LAB_0012e6b1:
      puVar5 = &CUtlRBTree<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short,CUtlMap<void*,DecalEntry,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<void*,DecalEntry,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                ::Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_0012e6b1;
LAB_0012e5ab:
      puVar5 = (ushort *)(g_DecalDictionary._4_4_ + uVar6 * 0x14);
    }
    uVar1 = *puVar5;
  } while( true );
}

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)