L L4D2node

CResponseSystem::CopyEnumerationsFrom

0x005bdd50 · 292 bytes · __thiscall

_ZN15CResponseSystem20CopyEnumerationsFromEPS_

Decompiled

undefined (2 params)

/* CResponseSystem::CopyEnumerationsFrom(CResponseSystem*) */

void __thiscall
CResponseSystem::CopyEnumerationsFrom(CResponseSystem *this,CResponseSystem *param_1)

{
  undefined4 uVar1;
  byte bVar2;
  ushort uVar3;
  ushort uVar4;
  int iVar5;
  byte *pbVar6;
  int iVar7;
  int local_24;
  byte *local_20;
  
  uVar3 = *(ushort *)(this + 0x388e);
  if (uVar3 != 0) {
    iVar7 = 0;
    do {
      iVar5 = iVar7 * 0x10 + *(int *)(this + 0x3880);
      if (iVar5 != -0xc) {
        uVar1 = *(undefined4 *)(iVar5 + 0xc);
        local_24 = *(undefined4 *)(iVar5 + 8);
        uVar4 = CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                ::Find((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                        *)(this + 0x3898),(Node_t *)&local_24);
        if (uVar4 == 0xffff) {
          local_20 = (byte *)ResponseCopyString("");
          bVar2 = *local_20;
          if (bVar2 == 0) goto LAB_005bde75;
LAB_005bdde5:
          iVar5 = -0x55555556;
          pbVar6 = local_20;
          do {
            pbVar6 = pbVar6 + 1;
            iVar5 = (uint)bVar2 + iVar5 * 0x21;
            bVar2 = *pbVar6;
          } while (bVar2 != 0);
        }
        else {
          local_20 = (byte *)ResponseCopyString(*(char **)((uint)uVar4 * 0x10 +
                                                           *(int *)(this + 0x389c) + 0xc));
          bVar2 = *local_20;
          if (bVar2 != 0) goto LAB_005bdde5;
LAB_005bde75:
          iVar5 = -0x55555556;
        }
        local_24 = iVar5;
        CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Insert((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *)(param_1 + 0x3898),(Node_t *)&local_24);
        local_24 = iVar5;
        local_20 = (byte *)uVar1;
        CUtlRBTree<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Insert((CUtlRBTree<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CResponseSystem::Enumeration,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *)(param_1 + 0x387c),(Node_t *)&local_24);
      }
      iVar7 = iVar7 + 1;
    } while (iVar7 < (int)(uint)uVar3);
  }
  return;
}

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)