L L4D2node

CSendTablePrecalc::SetupFlatPropertyArray

0x00142ec0 · 471 bytes · __thiscall

_ZN17CSendTablePrecalc22SetupFlatPropertyArrayEv

Decompiled

undefined (1 param)

/* CSendTablePrecalc::SetupFlatPropertyArray() */

undefined4 __thiscall CSendTablePrecalc::SetupFlatPropertyArray(CSendTablePrecalc *this)

{
  CSendNode *pCVar1;
  SendTable *pSVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  int in_GS_OFFSET;
  undefined4 local_a034;
  int local_a030;
  int local_a02c [1024];
  int *local_902c;
  undefined4 local_9028;
  SendProp *local_9024 [4095];
  int local_5028;
  SendProp *local_5024 [4095];
  undefined1 auStack_1028 [4096];
  int local_28;
  undefined1 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pSVar2 = *(SendTable **)(this + 0x8c);
  SetupArrayProps_R<SendTable,SendProp>(pSVar2);
  local_a034 = 0;
  uVar4 = SendTable_GetPropsExcluded(pSVar2,(ExcludeProp *)(pSVar2 + 4),local_a02c,(int)&local_a034)
  ;
  if ((char)uVar4 != '\0') {
    local_902c = local_a02c;
    local_5028 = 0;
    local_28 = 0;
    local_9028 = local_a034;
    pCVar1 = (CSendNode *)(this + 0x68);
    local_24 = 0;
    SendTable_BuildHierarchy(pCVar1,pSVar2,(CBuildHierarchyStruct *)&local_902c);
    SendTable_SortByPriority((CBuildHierarchyStruct *)&local_902c);
    CUtlVector<SendProp_const*,CUtlMemory<SendProp_const*,int>>::CopyArray
              ((CUtlVector<SendProp_const*,CUtlMemory<SendProp_const*,int>> *)(this + 0x2c),
               local_5024,local_28);
    CUtlVector<SendProp_const*,CUtlMemory<SendProp_const*,int>>::CopyArray
              ((CUtlVector<SendProp_const*,CUtlMemory<SendProp_const*,int>> *)(this + 0x54),
               local_9024,local_5028);
    iVar3 = local_28;
    *(undefined4 *)(this + 0x4c) = 0;
    if (local_28 != 0) {
      CUtlVector<unsigned_char,CUtlMemory<unsigned_char,int>>::GrowVector
                ((CUtlVector<unsigned_char,CUtlMemory<unsigned_char,int>> *)(this + 0x40),local_28);
      CUtlVector<unsigned_char,CUtlMemory<unsigned_char,int>>::ShiftElementsRight
                ((CUtlVector<unsigned_char,CUtlMemory<unsigned_char,int>> *)(this + 0x40),0,iVar3);
      if (0 < iVar3) {
        iVar5 = 0;
        do {
          *(undefined1 *)(*(int *)(this + 0x40) + iVar5) = auStack_1028[iVar5];
          iVar5 = iVar5 + 1;
        } while (iVar5 != iVar3);
      }
    }
    *(undefined4 *)(this + 0xf8) = 0;
    SetDataTableProxyIndices_R(this,pCVar1,(CBuildHierarchyStruct *)&local_902c);
    local_a030 = 0;
    SetRecursiveProxyIndices_R(pSVar2,pCVar1,&local_a030);
    SendTable_GenerateProxyPaths(this,local_a030);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar4;
}

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)