L L4D2node

CUtlDict<EventGroup,int>::Insert

0x00ba3200 · 250 bytes · __thiscall

_ZN8CUtlDictI10EventGroupiE6InsertEPKcRKS0_

Decompiled

undefined (3 params)

/* CUtlDict<EventGroup, int>::Insert(char const*, EventGroup const&) */

undefined4 __thiscall
CUtlDict<EventGroup,int>::Insert(CUtlDict<EventGroup,int> *this,char *param_1,EventGroup *param_2)

{
  ushort uVar1;
  undefined4 uVar2;
  char *local_3c;
  code *local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined2 local_28;
  undefined2 local_26;
  undefined2 local_24;
  undefined2 local_22;
  undefined4 local_20;
  
  local_3c = strdup(param_1);
  local_24 = 0xffff;
  local_28 = 0xffff;
  local_26 = 0;
  local_22 = 0xffff;
  local_38 = ChoreEventStartTimeLessFunc;
  local_34 = 0;
  local_30 = 0;
  local_2c = 0;
  local_20 = 0;
  CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
  ::RemoveAll((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
               *)&local_38);
  for (uVar1 = CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
               ::FirstInorder((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
                               *)param_2); uVar1 != 0xffff;
      uVar1 = CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
              ::NextInorder((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
                             *)param_2,uVar1)) {
                    /* try { // try from 00ba3291 to 00ba32be has its CatchHandler @ 00ba32fa */
    CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
    ::Insert((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
              *)&local_38,(CChoreoEvent **)(*(int *)(param_2 + 4) + 8 + (uint)uVar1 * 0xc));
  }
  uVar2 = CUtlRBTree<CUtlMap<char_const*,EventGroup,int>::Node_t,int,CUtlMap<char_const*,EventGroup,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,EventGroup,int>::Node_t,int>,int>>
          ::Insert((CUtlRBTree<CUtlMap<char_const*,EventGroup,int>::Node_t,int,CUtlMap<char_const*,EventGroup,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,EventGroup,int>::Node_t,int>,int>>
                    *)this,(Node_t *)&local_3c);
  CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
  ::RemoveAll((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
               *)&local_38);
  local_24 = 0xffff;
  CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>::Purge
            ((CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short> *)&local_34);
  local_22 = 0xffff;
  CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>::Purge
            ((CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short> *)&local_34);
  return uVar2;
}

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)