L L4D2node

CNetchanParanoidMode::Dump

0x001ae920 · 525 bytes · __thiscall

_ZN20CNetchanParanoidMode4DumpEP8CNetChanPKc

Decompiled

undefined (3 params)

/* CNetchanParanoidMode::Dump(CNetChan*, char const*) */

void __thiscall
CNetchanParanoidMode::Dump(CNetchanParanoidMode *this,CNetChan *param_1,char *param_2)

{
  char cVar1;
  netadr_s *this_00;
  undefined4 uVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  int *piVar7;
  char *pcVar8;
  int iVar9;
  int iVar10;
  int local_20;
  
  if ((*this != (CNetchanParanoidMode)0x0) && (cVar1 = IsEnabled(), cVar1 != '\0')) {
    Msg(&DAT_002baf02,param_2);
    this_00 = (netadr_s *)(**(code **)(*(int *)param_1 + 200))(param_1);
    uVar2 = netadr_s::ToString(this_00,false);
    uVar3 = (*(code *)**(undefined4 **)param_1)(param_1);
    iVar5 = 0;
    Msg("Dumping messages for channel %s(%s) 0x%p\n",uVar3,uVar2,param_1);
    pcVar8 = *(char **)(this + 0x10);
    Msg("Header bits %d, flags == %d\n",*(undefined4 *)(this + 0xc),pcVar8);
    piVar7 = *(int **)(this + 0x18);
    Msg("%d messages\n",piVar7);
    local_20 = 0;
    if (0 < *(int *)(this + 0x18)) {
      do {
        piVar6 = (int *)(local_20 + *(int *)(this + 0x14));
        Msg("%d -----------------------\n",iVar5,pcVar8,param_1);
        if (*piVar6 == 0) {
          iVar4 = piVar6[5];
        }
        else {
          iVar4 = piVar6[5];
          if (iVar4 == -1) {
            Msg("---> DIDN\'T FINISH PARSING %s\n",piVar6 + 0x26,pcVar8);
            iVar4 = piVar6[5];
          }
        }
        piVar7 = piVar6 + 0x26;
        iVar10 = piVar6[4];
        iVar9 = piVar6[1];
        param_1 = (CNetChan *)piVar6[3];
        pcVar8 = (char *)piVar6[2];
        Msg("%s: type( %d ) group ( %d ) size ( %d bytes ), startbit %d end bit %d\n",piVar7,pcVar8,
            param_1,iVar9,iVar10,iVar4);
        Msg("   %s\n",piVar6 + 0x2e);
        if (*piVar6 == 0) {
          Msg(" %s Control message\n",piVar7,pcVar8,param_1,iVar9,iVar10,iVar4);
        }
        else {
          Msg("RAW(%s) start\n",piVar7,pcVar8,param_1,iVar9,iVar10,iVar4);
          param_1 = (CNetChan *)piVar6[1];
          pcVar8 = (char *)*piVar6;
          LogMultiline(false,(char *)piVar7,pcVar8,(uint)param_1);
          Msg("RAW(%s) end\n",piVar7);
        }
        iVar5 = iVar5 + 1;
        local_20 = local_20 + 0x138;
      } while (iVar5 < *(int *)(this + 0x18));
    }
    Msg(&DAT_002baf31,piVar7,pcVar8,param_1);
    LogMultiline(false,"PKT",*(char **)(this + 8),*(uint *)(this + 4));
  }
  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)