L L4D2node

CopySendPropsToRecvProps

0x00151340 · 476 bytes · __regparm3

_ZL24CopySendPropsToRecvPropsR10CUtlRBTreeI14MatchingProp_ttPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEERK10CUtlVectorIPK8SendPropS5_ISE_iEERSB_IPK8RecvPropS5_ISL_iEE

Decompiled

undefined (3 params)

/* CopySendPropsToRecvProps(CUtlRBTree<MatchingProp_t, unsigned short, bool (*)(MatchingProp_t
   const&, MatchingProp_t const&), CUtlMemory<UtlRBTreeNode_t<MatchingProp_t, unsigned short>,
   unsigned short> >&, CUtlVector<SendProp const*, CUtlMemory<SendProp const*, int> > const&,
   CUtlVector<RecvProp const*, CUtlMemory<RecvProp const*, int> >&) */

void __regparm3
CopySendPropsToRecvProps(CUtlRBTree *param_1,CUtlVector *param_2,CUtlVector *param_3)

{
  ushort uVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  int local_30;
  undefined4 local_24 [5];
  
  iVar3 = *(int *)(param_2 + 0xc);
  *(undefined4 *)(param_3 + 0xc) = 0;
  if (iVar3 != 0) {
    CUtlVector<RecvProp_const*,CUtlMemory<RecvProp_const*,int>>::GrowVector
              ((CUtlVector<RecvProp_const*,CUtlMemory<RecvProp_const*,int>> *)param_3,iVar3);
    if ((0 < *(int *)(param_3 + 0xc) - iVar3) && (0 < iVar3)) {
      _V_memmove((void *)((int)*(void **)param_3 + iVar3 * 4),*(void **)param_3,
                 (*(int *)(param_3 + 0xc) - iVar3) * 4);
    }
  }
  local_30 = 0;
  if (0 < *(int *)(param_2 + 0xc)) {
    do {
      local_24[0] = *(undefined4 *)(*(int *)param_2 + local_30 * 4);
      if (*(ushort *)(param_1 + 0x10) != 0xffff) {
        iVar3 = *(int *)(param_1 + 4);
        uVar4 = (uint)*(ushort *)(param_1 + 0x10);
        do {
          while( true ) {
            iVar5 = uVar4 * 0x10;
            cVar2 = (**(code **)param_1)(local_24,iVar3 + 8 + iVar5);
            if (cVar2 != '\0') break;
            cVar2 = (**(code **)param_1)(*(int *)(param_1 + 4) + iVar5 + 8,local_24);
            if (cVar2 == '\0') {
              *(undefined4 *)(*(int *)param_3 + local_30 * 4) =
                   *(undefined4 *)(*(int *)(param_1 + 4) + 0xc + iVar5);
              goto LAB_00151421;
            }
            if ((CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
                 ::Links(unsigned_short)::s_Sentinel == '\0') &&
               (iVar3 = __cxa_guard_acquire(&CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
                                             ::Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
              CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
              ::Links(unsigned_short)::s_Sentinel = 0xffff;
              DAT_00340f22 = 0xffff;
              DAT_00340f24 = 0xffff;
              __cxa_guard_release(&CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
                                   ::Links(unsigned_short)::s_Sentinel);
            }
            iVar3 = *(int *)(param_1 + 4);
            uVar1 = *(ushort *)(iVar3 + 2 + iVar5);
            uVar4 = (uint)uVar1;
            if (uVar1 == 0xffff) goto LAB_00151412;
          }
          if ((CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
               ::Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar3 = __cxa_guard_acquire(&CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
                                           ::Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
            CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
            ::Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340f22 = 0xffff;
            DAT_00340f24 = 0xffff;
            __cxa_guard_release(&CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
                                 ::Links(unsigned_short)::s_Sentinel);
          }
          iVar3 = *(int *)(param_1 + 4);
          uVar4 = (uint)*(ushort *)(iVar3 + iVar5);
        } while (*(ushort *)(iVar3 + iVar5) != 0xffff);
      }
LAB_00151412:
      *(undefined4 *)(*(int *)param_3 + local_30 * 4) = 0;
LAB_00151421:
      local_30 = local_30 + 1;
    } while (local_30 < *(int *)(param_2 + 0xc));
  }
  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)