L L4D2node

CBlockingUDPSocket::CreateSocket

0x000bb1e0 · 139 bytes · __thiscall

_ZN18CBlockingUDPSocket12CreateSocketEv

Decompiled

undefined (1 param)

/* CBlockingUDPSocket::CreateSocket() */

bool __thiscall CBlockingUDPSocket::CreateSocket(CBlockingUDPSocket *this)

{
  undefined4 *puVar1;
  int iVar2;
  int in_GS_OFFSET;
  bool bVar3;
  sockaddr local_20;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = socket(2,2,0x11);
  *(int *)(this + 0x14) = iVar2;
  bVar3 = false;
  if (iVar2 != -1) {
    puVar1 = *(undefined4 **)(this + 4);
    local_20._0_4_ = *puVar1;
    local_20.sa_data._2_4_ = puVar1[1];
    local_20.sa_data._6_4_ = puVar1[2];
    local_20.sa_data._10_4_ = puVar1[3];
    iVar2 = bind(iVar2,&local_20,0x10);
    bVar3 = iVar2 != -1;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return bVar3;
  }
                    /* WARNING: Subroutine does not return */
  __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)