L L4D2node

CHLTVClientState::SetSignonState

0x0016c690 · 1179 bytes · __thiscall

_ZN16CHLTVClientState14SetSignonStateEiiP15NET_SignonState

Decompiled

undefined (4 params)

/* CHLTVClientState::SetSignonState(int, int, NET_SignonState*) */

undefined4 __thiscall
CHLTVClientState::SetSignonState
          (CHLTVClientState *this,int param_1,int param_2,NET_SignonState *param_3)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined **local_2a8;
  undefined1 local_2a4;
  undefined4 local_2a0;
  undefined4 local_29c;
  undefined4 local_298;
  undefined8 local_294;
  undefined4 local_28c;
  undefined4 local_288;
  undefined8 local_284;
  undefined4 local_27c;
  undefined4 local_278;
  undefined1 local_274;
  undefined8 local_270;
  undefined4 local_268;
  undefined4 local_264;
  int local_25c;
  int local_258;
  undefined4 local_254;
  int local_250;
  int local_24c;
  undefined4 local_248;
  undefined4 local_244;
  undefined4 local_240;
  undefined4 local_23c;
  undefined4 local_238;
  undefined4 local_234;
  undefined4 local_230;
  undefined4 local_22c;
  NetMessageCvar_t local_228 [260];
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = CBaseClientState::SetSignonState((int)this,param_1,(NET_SignonState *)param_2);
  iVar1 = local_25c;
  if ((char)uVar2 == '\0') goto LAB_0016ca33;
  iVar3 = *(int *)(this + 0x60);
  switch(iVar3) {
  case 2:
    (**(code **)(**(int **)(this + 0x10) + 0x84))(*(int **)(this + 0x10),0x43960000,0);
    (**(code **)(**(int **)(this + 0x10) + 0x94))(*(int **)(this + 0x10));
    local_29c = 0;
    local_298 = 0;
    local_294 = 0;
    local_28c = 0;
    local_288 = 0;
    local_284 = 0;
    local_27c = 0;
    local_278 = 0;
    local_274 = 0;
    local_270 = 0;
    local_268 = 0;
    local_264 = 0;
    local_2a4 = 1;
    local_2a0 = 0;
    local_2a8 = &PTR__NET_SetConVar_002a1ca8;
    local_25c = 0;
    local_258 = 0;
    local_254 = 0;
    local_250 = 0;
    local_24c = 0;
                    /* try { // try from 0016c7ed to 0016c861 has its CatchHandler @ 0016cb40 */
    Host_BuildUserInfoUpdateMessage(0,(CUtlVector *)&local_25c,false);
    _V_strcpy((char *)local_228,"tv_relay");
    _V_strcpy(local_124,"1");
    CUtlVector<NetMessageCvar_t,CUtlMemory<NetMessageCvar_t,int>>::InsertBefore
              ((CUtlVector<NetMessageCvar_t,CUtlMemory<NetMessageCvar_t,int>> *)&local_25c,local_250
               ,local_228);
    (**(code **)(**(int **)(this + 0x10) + 0xa8))(*(int **)(this + 0x10),&local_2a8,0,0);
    local_2a8 = &PTR__NET_SetConVar_002a1ca8;
    local_250 = 0;
    CUtlMemory<NetMessageCvar_t,int>::Purge((CUtlMemory<NetMessageCvar_t,int> *)&local_25c);
    local_24c = local_25c;
    CUtlMemory<NetMessageCvar_t,int>::Purge((CUtlMemory<NetMessageCvar_t,int> *)&local_25c);
    iVar3 = *(int *)(this + 0x60);
    break;
  case 3:
    SendClientInfo(this);
    iVar3 = *(int *)(this + 0x60);
    iVar1 = local_25c;
    goto joined_r0x0016ca64;
  case 5:
    CHLTVServer::SignonComplete(*(CHLTVServer **)(this + 0x49ec));
    iVar3 = *(int *)(this + 0x60);
    iVar1 = local_25c;
joined_r0x0016ca64:
    local_25c = iVar3;
    if (local_25c < 2) goto LAB_0016ca33;
    goto LAB_0016c89e;
  case 6:
    (**(code **)(**(int **)(this + 0x10) + 0x84))
              (*(int **)(this + 0x10),*(undefined4 *)(tv_timeout._28_4_ + 0x2c),0);
    if (*(int *)(tv_autorecord._28_4_ + 0x30) == 0) goto LAB_0016ca9c;
    CHLTVDemoRecorder::StartAutoRecording((CHLTVDemoRecorder *)(hltv + 0x4c04));
    (**(code **)(**(int **)(this + 0x10) + 0x88))(*(int **)(this + 0x10),hltv + 0x4c04);
    iVar3 = *(int *)(this + 0x60);
    break;
  case 7:
    CHLTVServer::Changelevel(*(CHLTVServer **)(this + 0x49ec));
    (**(code **)(**(int **)(this + 0x10) + 0x84))(*(int **)(this + 0x10),0x43960000,0,param_3);
LAB_0016ca9c:
    iVar3 = *(int *)(this + 0x60);
    iVar1 = local_25c;
    goto joined_r0x0016caa2;
  }
  iVar1 = local_25c;
joined_r0x0016caa2:
  local_25c = iVar3;
  if (1 < local_25c) {
LAB_0016c89e:
    local_29c = 0;
    local_298 = 0;
    local_294 = 0;
    local_258 = param_2;
    local_28c = 0;
    local_288 = 0;
    local_284 = 0;
    local_27c = 0;
    local_278 = 0;
    local_274 = 0;
    local_270 = 0;
    local_268 = 0;
    local_264 = 0;
    local_2a4 = 1;
    local_2a0 = 0;
    local_2a8 = &PTR__NET_SignonState_002a1888;
    local_250 = 0;
    local_24c = 0;
    local_248 = 0;
    local_244 = 0;
    local_240 = 0;
    local_23c = 0;
    local_238 = 0;
    local_234 = 0;
    local_230 = 0;
    local_22c = 0;
    local_254 = 0;
                    /* try { // try from 0016c9cb to 0016c9d0 has its CatchHandler @ 0016cb7a */
    (**(code **)(**(int **)(this + 0x10) + 0xa8))(*(int **)(this + 0x10),&local_2a8,0,0);
    local_2a8 = &PTR__NET_SignonState_002a1888;
    local_230 = 0;
    CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)&local_23c);
    local_22c = local_23c;
    CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)&local_23c);
    local_244 = 0;
    CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)&local_250);
    local_240 = local_250;
    CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)&local_250);
    iVar1 = local_25c;
  }
LAB_0016ca33:
  local_25c = iVar1;
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* 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)