L L4D2node

CDmxSerializationDictionary::RootElementCount

0x00bee7b0 · 325 bytes · __thiscall

_ZNK27CDmxSerializationDictionary16RootElementCountEv

Decompiled

undefined (1 param)

/* CDmxSerializationDictionary::RootElementCount() const */

int __thiscall CDmxSerializationDictionary::RootElementCount(CDmxSerializationDictionary *this)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(this + 0x10);
  while( true ) {
    iVar2 = iVar1;
    if ((CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
         ::Links(int)::s_Sentinel == '\0') &&
       (iVar1 = __cxa_guard_acquire(&CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
                                     ::Links(int)::s_Sentinel), iVar1 != 0)) {
      CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
      ::Links(int)::s_Sentinel = -1;
      DAT_00f71eb8 = 0xffffffff;
      DAT_00f71ebc = 0xffffffff;
      __cxa_guard_release(&CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
                           ::Links(int)::s_Sentinel);
    }
    iVar1 = CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
            ::Links(int)::s_Sentinel;
    if (iVar2 != -1) {
      iVar1 = *(int *)(*(int *)(this + 4) + iVar2 * 0x18);
    }
    if (iVar1 == -1) break;
    if ((CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
         ::Links(int)::s_Sentinel == '\0') &&
       (iVar1 = __cxa_guard_acquire(&CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
                                     ::Links(int)::s_Sentinel), iVar1 != 0)) {
      CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
      ::Links(int)::s_Sentinel = -1;
      DAT_00f71eb8 = 0xffffffff;
      DAT_00f71ebc = 0xffffffff;
      __cxa_guard_release(&CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
                           ::Links(int)::s_Sentinel);
    }
    iVar1 = CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
            ::Links(int)::s_Sentinel;
    if (iVar2 != -1) {
      iVar1 = *(int *)(*(int *)(this + 4) + iVar2 * 0x18);
    }
  }
  iVar1 = 0;
  if (iVar2 != -1) {
    iVar1 = 0;
    do {
      iVar1 = (iVar1 + 1) - (uint)(*(char *)(*(int *)(this + 4) + iVar2 * 0x18 + 0x14) == '\0');
      iVar2 = CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
              ::NextInorder((CUtlRBTree<CDmxSerializationDictionary::DmxElementInfo_t,int,bool(*)(CDmxSerializationDictionary::DmxElementInfo_t_const&,CDmxSerializationDictionary::DmxElementInfo_t_const&),CUtlMemory<UtlRBTreeNode_t<CDmxSerializationDictionary::DmxElementInfo_t,int>,int>>
                             *)this,iVar2);
    } while (iVar2 != -1);
  }
  return iVar1;
}

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)