L L4D2node

CResponseSystem::DispatchParseRule

0x005b5a60 · 331 bytes · __thiscall

_ZN15CResponseSystem17DispatchParseRuleEPKcjR7CUtlMapIjMS_FvR4RuleEtES4_

Decompiled

undefined (5 params)

/* CResponseSystem::DispatchParseRule(char const*, unsigned int, CUtlMap<unsigned int, void
   (CResponseSystem::*)(Rule&), unsigned short>&, Rule&) */

undefined4 __thiscall
CResponseSystem::DispatchParseRule
          (CResponseSystem *this,char *param_1,uint param_2,CUtlMap *param_3,Rule *param_4)

{
  int iVar1;
  ushort uVar2;
  char cVar3;
  uint uVar4;
  int iVar5;
  code *pcVar6;
  uint local_28 [6];
  
  local_28[0] = param_2;
  uVar4 = (uint)*(ushort *)(param_3 + 0x10);
  if (*(ushort *)(param_3 + 0x10) != 0xffff) {
    iVar5 = *(int *)(param_3 + 4);
    do {
      while( true ) {
        iVar1 = uVar4 * 0x14;
        cVar3 = (**(code **)param_3)(local_28,iVar5 + 8 + iVar1);
        if (cVar3 != '\0') break;
        cVar3 = (**(code **)param_3)(*(int *)(param_3 + 4) + iVar1 + 8,local_28);
        if (cVar3 == '\0') {
          pcVar6 = *(code **)(iVar1 + *(int *)(param_3 + 4) + 0xc);
          if (((uint)pcVar6 & 1) != 0) {
            pcVar6 = *(code **)(pcVar6 + *(int *)(this + *(int *)(iVar1 + *(int *)(param_3 + 4) +
                                                                 0x10)) + -1);
          }
          (*pcVar6)(this + *(int *)(iVar1 + *(int *)(param_3 + 4) + 0x10),param_4);
          return 1;
        }
        if ((CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
             ::Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                         ::Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
          CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f21cb2 = 0xffff;
          DAT_00f21cb4 = 0xffff;
          __cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                               ::Links(unsigned_short)::s_Sentinel);
        }
        iVar5 = *(int *)(param_3 + 4);
        uVar2 = *(ushort *)(iVar5 + 2 + iVar1);
        uVar4 = (uint)uVar2;
        if (uVar2 == 0xffff) {
          return 0;
        }
      }
      if ((CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
           ::Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar5 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                       ::Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
        DAT_00f21cb2 = 0xffff;
        CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cb4 = 0xffff;
        __cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Rule&),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                             ::Links(unsigned_short)::s_Sentinel);
      }
      iVar5 = *(int *)(param_3 + 4);
      uVar2 = *(ushort *)(iVar5 + uVar4 * 0x14);
      uVar4 = (uint)uVar2;
    } while (uVar2 != 0xffff);
  }
  return 0;
}

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)