L L4D2node

CHLTVServer::BroadcastLocalChat

0x00170f40 · 669 bytes · __thiscall

_ZN11CHLTVServer18BroadcastLocalChatEPKcS1_

Decompiled

undefined (3 params)

/* CHLTVServer::BroadcastLocalChat(char const*, char const*) */

void __thiscall CHLTVServer::BroadcastLocalChat(CHLTVServer *this,char *param_1,char *param_2)

{
  int *piVar1;
  char cVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  int in_GS_OFFSET;
  undefined **local_4ac;
  undefined1 local_4a8;
  undefined4 local_4a4;
  undefined4 local_4a0;
  undefined4 local_49c;
  undefined8 local_498;
  undefined4 local_490;
  undefined4 local_48c;
  undefined8 local_488;
  undefined4 local_480;
  undefined4 local_47c;
  undefined1 local_478;
  undefined8 local_474;
  undefined4 local_46c;
  undefined4 local_468;
  undefined4 local_45c;
  undefined1 local_458;
  undefined4 local_454;
  undefined4 local_450;
  bf_write local_438 [24];
  undefined1 local_420 [1024];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar3 = (int *)(**(code **)(s_GameEventManager + 0x1c))(&s_GameEventManager,"hltv_chat",1,0);
  if (piVar3 != (int *)0x0) {
    (**(code **)(*piVar3 + 0x3c))(piVar3,&DAT_002b16af,param_1);
    local_4a0 = 0;
    local_498 = 0;
    local_488 = 0;
    local_474 = 0;
    local_49c = 0;
    local_490 = 0;
    local_48c = 0;
    local_480 = 0;
    local_47c = 0;
    local_478 = 0;
    local_46c = 0;
    local_468 = 0;
    local_4a8 = 1;
    local_4a4 = 0;
    local_4ac = &PTR__SVC_GameEvent_002a1f48;
    local_458 = 0;
    local_45c = 0;
    local_454 = 0xffffffff;
    local_450 = 0;
    bf_write::bf_write(local_438);
    local_4a8 = 0;
    bf_write::StartWriting(local_438,local_420,0x400,0,-1);
    cVar2 = (**(code **)(s_GameEventManager + 0x30))(&s_GameEventManager,piVar3,local_438);
    if (cVar2 == '\0') {
      uVar5 = (**(code **)(*piVar3 + 8))(piVar3);
      DevMsg("CHLTVServer: failed to serialize chat \'%s\'.\n",uVar5);
      (**(code **)(s_GameEventManager + 0x2c))(&s_GameEventManager,piVar3);
    }
    else {
      iVar6 = 0;
      if (0 < *(int *)(this + 0x124)) {
        do {
          while( true ) {
            piVar1 = *(int **)(*(int *)(this + 0x118) + iVar6 * 4);
            cVar2 = (**(code **)(*piVar1 + 0x74))(piVar1);
            if ((((cVar2 != '\0') && (cVar2 = (**(code **)(*piVar1 + 0x70))(piVar1), cVar2 != '\0'))
                && (cVar2 = (**(code **)(*piVar1 + 0x7c))(piVar1), cVar2 == '\0')) &&
               ((iVar4 = _V_strcmp((char *)((int)piVar1 + 0x1d759),param_2), iVar4 == 0 &&
                ((char)piVar1[0x75d6] == '\0')))) break;
            iVar6 = iVar6 + 1;
            if (*(int *)(this + 0x124) <= iVar6) goto LAB_00171170;
          }
          iVar6 = iVar6 + 1;
          (**(code **)(*piVar1 + 100))(piVar1,&local_4ac,0,0);
        } while (iVar6 < *(int *)(this + 0x124));
      }
LAB_00171170:
      (**(code **)(s_GameEventManager + 0x2c))(&s_GameEventManager,piVar3);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)