L L4D2node

CWin32UploadGameStats::SendProtocolVersion

0x00213140 · 330 bytes · __thiscall

_ZN21CWin32UploadGameStats19SendProtocolVersionER22EGameStatsUploadStatusR10CUtlBuffer

Decompiled

undefined (3 params)

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

bool __thiscall
CWin32UploadGameStats::SendProtocolVersion
          (CWin32UploadGameStats *this,EGameStatsUploadStatus *param_1,CUtlBuffer *param_2)

{
  char cVar1;
  ssize_t sVar2;
  int iVar3;
  void *pvVar4;
  undefined1 local_10;
  undefined1 local_f;
  undefined1 local_e;
  undefined1 local_d;
  
  UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),
                 "Sending game stats harvester protocol info.");
  CUtlBuffer::SetBigEndian(param_2,true);
  *(undefined4 *)(param_2 + 0xc) = 0;
  *(undefined4 *)(param_2 + 0x10) = 0;
  *(undefined4 *)(param_2 + 0x20) = 0;
  *(undefined4 *)(param_2 + 0x1c) = 0;
  param_2[0x14] = (CUtlBuffer)0x0;
  CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)param_2);
  if (((byte)param_2[0x15] & 1) == 0) {
    cVar1 = CUtlBuffer::CheckPut(param_2,4);
    if (cVar1 != '\0') {
      if (((byte)param_2[0x34] & 1) == 0) {
        *(undefined4 *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = 1
        ;
        iVar3 = *(int *)(param_2 + 0x10);
      }
      else {
        iVar3 = *(int *)(param_2 + 0x10);
        pvVar4 = (void *)((iVar3 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
        if (pvVar4 != (void *)0x0) {
          local_10 = 0;
          local_f = 0;
          local_e = 0;
          local_d = 1;
          _V_memcpy(pvVar4,&local_10,4);
          iVar3 = *(int *)(param_2 + 0x10);
        }
      }
      *(int *)(param_2 + 0x10) = iVar3 + 4;
      CUtlBuffer::AddNullTermination(param_2);
    }
  }
  else {
    CUtlBuffer::Printf(param_2,"%d",1);
  }
  sVar2 = send(*(int *)(this + 0x28),*(void **)param_2,*(size_t *)(param_2 + 0x10),0);
  if (sVar2 == -1) {
    UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),"Send failed.");
    *(undefined4 *)param_1 = 1;
  }
  else {
    *(undefined4 *)(this + 0x14) = 3;
  }
  return sVar2 != -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)