L L4D2node

CBaseClientState::InternalProcessStringCmd

0x001018a0 · 314 bytes · __thiscall

_ZN16CBaseClientState24InternalProcessStringCmdEP13NET_StringCmdb

Decompiled

undefined (3 params)

/* CBaseClientState::InternalProcessStringCmd(NET_StringCmd*, bool) */

undefined4 __thiscall
CBaseClientState::InternalProcessStringCmd
          (CBaseClientState *this,NET_StringCmd *param_1,bool param_2)

{
  undefined4 uVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  int in_GS_OFFSET;
  int local_528 [258];
  char *local_120;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((this[0x49d8] != (CBaseClientState)0x0) && (DAT_003b7f64 < 2)) {
    CCommand::CCommand((CCommand *)local_528);
    CCommand::Tokenize((CCommand *)local_528,*(char **)(param_1 + 0x4c),(characterset_t *)0x0);
    if (local_528[0] < 1) goto LAB_001018ee;
    if ((!param_2) || (iVar4 = _V_stricmp(local_120,"Connect"), iVar4 != 0)) {
      cVar2 = Cbuf_HasRoomForExecutionMarkers(2);
      if (cVar2 != '\0') {
        uVar1 = *(undefined4 *)(param_1 + 0x4c);
        uVar3 = Cbuf_GetCurrentPlayer();
        Cbuf_AddTextWithMarkers(uVar3,0x61,uVar1,0x62);
      }
      goto LAB_001018ee;
    }
    iVar4 = V_stristr(*(char **)(param_1 + 0x4c),";");
    if ((iVar4 != 0) || (iVar4 = V_stristr(*(char **)(param_1 + 0x4c),"\n"), iVar4 != 0))
    goto LAB_001018ee;
  }
  uVar1 = *(undefined4 *)(param_1 + 0x4c);
  uVar3 = Cbuf_GetCurrentPlayer();
  Cbuf_AddText(uVar3,uVar1,0);
LAB_001018ee:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return 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)