L L4D2node

CBaseServer::SendClientMessages

0x00108290 · 575 bytes · __cdecl

_ZN11CBaseServer18SendClientMessagesEb

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseServer::SendClientMessages(bool) */

void CBaseServer::SendClientMessages(bool param_1)

{
  uint *puVar1;
  int *piVar2;
  int *piVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  undefined3 in_stack_00000005;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_Plat_SetBenchmarkMode == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_Plat_SetBenchmarkMode + 0x50))
              (_Plat_SetBenchmarkMode,&local_34,0,0,0,0,"/data/src/engine/./baseserver.cpp",0xa5c,
               &SendClientMessages(bool)::tm_fmt,"(%s)%s","Networking","SendClientMessages");
    local_20 = _Plat_SetBenchmarkMode;
  }
  iVar6 = _DAT_0040b9d4;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0010841e to 0010847e has its CatchHandler @ 001084fe */
  if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
     (iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
    if ((char *)*_DAT_0040b030 != "SendClientMessages") {
      _DAT_0040b030 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a8175,(char *)0x0,0x2a6193);
    }
    puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0040b02c = '\0';
  }
  if (0 < *(int *)(_param_1 + 0x120)) {
    iVar6 = 0;
    do {
      while( true ) {
        piVar2 = *(int **)(*(int *)(_param_1 + 0x114) + iVar6 * 4);
        cVar4 = (**(code **)(*piVar2 + 0xcc))(piVar2);
        if (cVar4 != '\0') break;
LAB_00108376:
        iVar6 = iVar6 + 1;
        if (*(int *)(_param_1 + 0x120) <= iVar6) goto LAB_001083c0;
      }
      piVar3 = (int *)piVar2[0x3a];
      if (piVar3 != (int *)0x0) {
                    /* try { // try from 00108365 to 001083ae has its CatchHandler @ 001084dd */
        (**(code **)(*piVar3 + 0xc4))(piVar3,0);
        (**(code **)(*piVar2 + 0xd0))(piVar2);
        goto LAB_00108376;
      }
      Msg("Client has no netchannel.\n");
      iVar6 = iVar6 + 1;
    } while (iVar6 < *(int *)(_param_1 + 0x120));
  }
LAB_001083c0:
  iVar6 = _DAT_0040b9d4;
  if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
     (iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
    cVar4 = CVProfNode::ExitScope();
    if (cVar4 != '\0') {
      _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
    }
    DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return;
}

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)