L L4D2node

AddRecvTableR

0x0016f4e0 · 392 bytes · __regparm3

_ZL13AddRecvTableRP9SendTablePP9RecvTableRi

Decompiled

undefined (3 params)

/* AddRecvTableR(SendTable*, RecvTable**, int&) */

RecvTable * __regparm3 AddRecvTableR(SendTable *param_1,RecvTable **param_2,int *param_3)

{
  undefined4 uVar1;
  RecvTable *pRVar2;
  uint uVar3;
  RecvProp *pRVar4;
  int iVar5;
  undefined4 uVar6;
  uint uVar7;
  int iVar8;
  RecvProp *pRVar9;
  
  pRVar2 = (RecvTable *)FindRecvTable(*(char **)(param_1 + 8),param_2,*param_3);
  if (pRVar2 != (RecvTable *)0x0) {
    return pRVar2;
  }
  uVar7 = *(uint *)(param_1 + 4);
  if ((int)uVar7 < 1) {
    pRVar2 = operator_new(0x14);
                    /* try { // try from 0016f66b to 0016f66f has its CatchHandler @ 0016f699 */
    RecvTable::RecvTable(pRVar2,(RecvProp *)0x0,0,*(char **)(param_1 + 8));
  }
  else {
    uVar3 = 0xffffffff;
    if (uVar7 < 0x2200001) {
      uVar3 = uVar7 * 0x3c;
    }
    iVar8 = uVar7 - 1;
    pRVar4 = operator_new__(uVar3);
    pRVar9 = pRVar4;
    do {
                    /* try { // try from 0016f54b to 0016f54f has its CatchHandler @ 0016f672 */
      RecvProp::RecvProp(pRVar9);
      iVar8 = iVar8 + -1;
      pRVar9 = pRVar9 + 0x3c;
    } while (iVar8 != -1);
    iVar8 = 0;
    pRVar9 = pRVar4 + -0x3c;
    if (0 < *(int *)(param_1 + 4)) {
      do {
        while( true ) {
          iVar5 = iVar8 * 0x54 + *(int *)param_1;
          *(undefined4 *)(pRVar9 + 0x3c) = *(undefined4 *)(iVar5 + 0x30);
          *(undefined4 *)(pRVar9 + 0x40) = *(undefined4 *)(iVar5 + 8);
          uVar7 = *(uint *)(iVar5 + 0x3c);
          if ((uVar7 & 0x40) != 0) {
            *(char **)(pRVar9 + 0x3c) = "IsExcludedProp";
            uVar7 = *(uint *)(iVar5 + 0x3c);
          }
          if ((uVar7 & 0x100) != 0) {
            pRVar9[0x4c] = (RecvProp)0x1;
            *(char **)(pRVar9 + 0x3c) = "InsideArrayProp";
          }
          if (*(int *)(iVar5 + 8) != 5) break;
          *(RecvProp **)(pRVar9 + 0x54) = pRVar9;
          uVar6 = *(undefined4 *)(iVar5 + 0x24);
          uVar1 = *(undefined4 *)(iVar5 + 0x20);
          *(undefined4 *)(pRVar9 + 0x40) = 5;
          *(undefined4 *)(pRVar9 + 0x6c) = uVar6;
          *(undefined4 *)(pRVar9 + 0x70) = uVar1;
          if (*(int *)(iVar5 + 8) != 6) goto LAB_0016f575;
LAB_0016f5e4:
          iVar8 = iVar8 + 1;
          uVar6 = AddRecvTableR(*(SendTable **)(iVar5 + 0x48),param_2,param_3);
          *(undefined4 *)(pRVar9 + 100) = uVar6;
          pRVar9 = pRVar9 + 0x3c;
          if (*(int *)(param_1 + 4) <= iVar8) goto LAB_0016f600;
        }
        if (*(int *)(iVar5 + 8) == 6) goto LAB_0016f5e4;
LAB_0016f575:
        iVar8 = iVar8 + 1;
        pRVar9 = pRVar9 + 0x3c;
      } while (iVar8 < *(int *)(param_1 + 4));
    }
LAB_0016f600:
    pRVar2 = operator_new(0x14);
                    /* try { // try from 0016f626 to 0016f62a has its CatchHandler @ 0016f687 */
    RecvTable::RecvTable(pRVar2,pRVar4,*(int *)(param_1 + 4),*(char **)(param_1 + 8));
  }
  param_2[*param_3] = pRVar2;
  *param_3 = *param_3 + 1;
  return pRVar2;
}

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)