L L4D2node

CBaseClientState::HandleReserveServerChallengeResponse

0x001032f0 · 278 bytes · __thiscall

_ZN16CBaseClientState36HandleReserveServerChallengeResponseEi.part.46

Decompiled

undefined (2 params)

/* CBaseClientState::HandleReserveServerChallengeResponse(int) [clone .part.46] */

void __thiscall
CBaseClientState::HandleReserveServerChallengeResponse(CBaseClientState *this,int param_1)

{
  CBaseClientState *in_EAX;
  long lVar1;
  int iVar2;
  int in_EDX;
  int iVar3;
  int iVar4;
  int in_GS_OFFSET;
  uchar *local_310 [3];
  int local_304;
  undefined1 local_2f8 [728];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  bf_write::bf_write((bf_write *)local_310,local_2f8,0x2d8,-1);
  bf_write::WriteLong((bf_write *)local_310,-1);
  bf_write::WriteByte((bf_write *)local_310,0x6e);
  lVar1 = GetHostVersion();
  bf_write::WriteLong((bf_write *)local_310,lVar1);
  iVar4 = 0;
  BuildReserveServerPayload(in_EAX,(bf_write *)local_310,in_EDX);
  if (0 < *(int *)(in_EAX + 0x180)) {
    iVar3 = 0;
    do {
      iVar3 = iVar3 + 1;
      iVar2 = *(int *)(in_EAX + 0x174) + iVar4;
      iVar4 = iVar4 + 0x2c;
      NET_SendPacket((INetChannel *)0x0,*(int *)(in_EAX + 0xc),(netadr_s *)(iVar2 + 0x20),
                     local_310[0],local_304 + 7 >> 3,(bf_write *)0x0,false,0);
    } while (iVar3 < *(int *)(in_EAX + 0x180));
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* 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)