L L4D2node

CWin32UploadGameStats::CreateTCPSocket

0x00212b20 · 115 bytes · __cdecl

_ZN21CWin32UploadGameStats15CreateTCPSocketER22EGameStatsUploadStatusR10CUtlBuffer

Decompiled

undefined (2 params)

/* CWin32UploadGameStats::CreateTCPSocket(EGameStatsUploadStatus&, CUtlBuffer&) */

bool CWin32UploadGameStats::CreateTCPSocket(EGameStatsUploadStatus *param_1,CUtlBuffer *param_2)

{
  int iVar1;
  
  UpdateProgress(*(TGameStatsParameters **)(param_1 + 0x2c),"Creating game stats upload socket.");
  iVar1 = socket(2,1,6);
  *(int *)(param_1 + 0x28) = iVar1;
  if (iVar1 == -1) {
    UpdateProgress(*(TGameStatsParameters **)(param_1 + 0x2c),"Socket creation failed.");
    *(undefined4 *)param_2 = 1;
  }
  else {
    *(undefined4 *)(param_1 + 0x14) = 1;
  }
  return iVar1 != -1;
}

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)