L L4D2node

CNetChan::SendNetMsg

0x001adba0 · 215 bytes · __thiscall

_ZN8CNetChan10SendNetMsgER11INetMessagebb

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNetChan::SendNetMsg(INetMessage&, bool, bool) */

undefined4 __thiscall
CNetChan::SendNetMsg(CNetChan *this,INetMessage *param_1,bool param_2,bool param_3)

{
  char cVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  CNetChan *pCVar5;
  
  iVar2 = netadr_s::GetType((netadr_s *)(this + 0x98));
  uVar3 = 1;
  if (iVar2 != 0) {
    cVar1 = (**(code **)(*(int *)param_1 + 0x20))(param_1);
    if ((cVar1 != '\0') || (param_2)) {
      pCVar5 = this + 0x20;
    }
    else {
      pCVar5 = this + 0x44;
    }
    if (param_3) {
      pCVar5 = this + 0x68;
    }
    if (*(int *)(vcr_verbose._28_4_ + 0x30) == 0) {
                    /* WARNING: Could not recover jumptable at 0x001adc72. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar3 = (**(code **)(*(int *)param_1 + 0x1c))();
      return uVar3;
    }
    iVar4 = *(int *)(pCVar5 + 0xc) + 7 >> 3;
    uVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,pCVar5);
    iVar2 = *(int *)(pCVar5 + 0xc) + 7 >> 3;
    if (iVar4 < iVar2) {
      (**(code **)(_g_pVCR + 0x90))("NetMsg",iVar4 + *(int *)pCVar5,(iVar2 - iVar4) + -1);
    }
  }
  return uVar3;
}

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)