L L4D2node

NET_SendToImpl

0x001c3d40 · 300 bytes · __cdecl

_Z14NET_SendToImpliPKciPK8sockaddrii

Decompiled

undefined (6 params)

/* NET_SendToImpl(int, char const*, int, sockaddr const*, int, int) */

void NET_SendToImpl(int param_1,char *param_2,int param_3,sockaddr *param_4,int param_5,int param_6)

{
  code *pcVar1;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  int in_GS_OFFSET;
  int iStackY_60;
  int local_58;
  char *local_54;
  int local_50 [2];
  sockaddr *local_48;
  int local_44;
  undefined2 uStack_40;
  undefined1 auStack_3e [10];
  char *local_34;
  int local_30;
  int local_20;
  
  puVar4 = &stack0xffffffa4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((net_dedicatedForXbox == '\0') || (net_dedicatedForXboxInsecure != '\0')) {
    local_54 = param_2;
    local_44 = param_5;
    local_48 = param_4;
    local_50[1] = 0;
    local_50[0] = param_3;
    local_58 = param_1;
    iStackY_60 = 0x1c3da0;
    (**(code **)(*(int *)g_pSteamSocketMgr + 0x14))();
  }
  else {
    iVar3 = param_3;
    if (param_6 != -1) {
      iVar3 = CONCAT22((short)((uint)param_3 >> 0x10),(undefined2)param_6);
    }
    if (((*(int *)(voice_xsend_debug._28_4_ + 0x30) != 0) && (-1 < param_6)) && (param_6 != param_3)
       ) {
      local_34 = param_2;
      local_54 = (char *)(param_3 - param_6);
      local_50[0] = param_3;
      local_58 = param_1;
      iStackY_60 = 0x1c3e0a;
      local_30 = iVar3;
      DevMsg("XVoice: VDP packet to %d with unencrypted %d bytes out of %d bytes\n");
      param_2 = local_34;
      iVar3 = local_30;
    }
    iVar2 = -((param_3 + 0x11U & 0xfffffff0) + 0x10);
    puVar4 = auStack_3e + iVar2 + -0x1e;
    *(undefined2 *)((int)&uStack_40 + iVar2) = (short)iVar3;
    *(int *)((int)&local_54 + iVar2) = param_3;
    *(undefined1 **)(auStack_3e + iVar2 + -0x1e) = auStack_3e + iVar2;
    *(char **)((int)&stack0xffffffa8 + iVar2) = param_2;
    *(undefined4 *)((int)&iStackY_60 + iVar2) = 0x1c3e3b;
    memcpy(*(void **)(auStack_3e + iVar2 + -0x1e),*(void **)((int)&stack0xffffffa8 + iVar2),
           *(size_t *)((int)&local_54 + iVar2));
    iVar3 = *(int *)g_pSteamSocketMgr;
    *(sockaddr **)((int)&local_48 + iVar2) = param_4;
    *(int *)((int)&local_44 + iVar2) = param_5;
    *(undefined4 *)((int)local_50 + iVar2 + 4) = 0;
    *(int *)((int)local_50 + iVar2) = param_3 + 2;
    *(undefined2 **)((int)&local_54 + iVar2) = (undefined2 *)((int)&uStack_40 + iVar2);
    *(int *)((int)&stack0xffffffa8 + iVar2) = param_1;
    *(undefined **)(auStack_3e + iVar2 + -0x1e) = g_pSteamSocketMgr;
    pcVar1 = *(code **)(iVar3 + 0x14);
    *(undefined4 *)((int)&iStackY_60 + iVar2) = 0x1c3e6a;
    (*pcVar1)();
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  *(undefined **)(puVar4 + -4) = &UNK_001c3e74;
  __stack_chk_fail();
}

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)