L L4D2node

CNetworkStringTableContainer::WriteUpdateMessage

0x001a7ba0 · 1057 bytes · __thiscall

_ZN28CNetworkStringTableContainer18WriteUpdateMessageEP11CBaseClientiR8bf_write

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNetworkStringTableContainer::WriteUpdateMessage(CBaseClient*, int, bf_write&) */

void __thiscall
CNetworkStringTableContainer::WriteUpdateMessage
          (CNetworkStringTableContainer *this,CBaseClient *param_1,int param_2,bf_write *param_3)

{
  uint *puVar1;
  int iVar2;
  char cVar3;
  CNetworkStringTable *this_00;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  undefined4 uStack_37b6c;
  undefined4 uStack_37b68;
  undefined4 uStack_37b60;
  undefined4 uStack_37b5c;
  int iStack_37b58;
  undefined **ppuStack_37b54;
  undefined1 uStack_37b50;
  undefined4 uStack_37b4c;
  undefined4 uStack_37b48;
  undefined4 uStack_37b44;
  undefined4 uStack_37b40;
  undefined4 uStack_37b3c;
  undefined4 uStack_37b38;
  undefined4 uStack_37b34;
  undefined4 uStack_37b30;
  undefined4 uStack_37b2c;
  undefined4 uStack_37b28;
  undefined4 uStack_37b24;
  undefined1 uStack_37b20;
  undefined4 uStack_37b1c;
  undefined4 uStack_37b18;
  undefined4 uStack_37b14;
  undefined4 uStack_37b10;
  undefined4 uStack_37b08;
  undefined4 uStack_37b04;
  undefined4 uStack_37afc;
  undefined1 uStack_37af8;
  undefined4 uStack_37af4;
  undefined4 uStack_37af0;
  bf_write abStack_37ad8 [24];
  undefined1 auStack_37ac0 [228016];
  
  uStack_37b6c = 0;
  uStack_37b68 = 0;
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  if (_Plat_SetBenchmarkMode == 0) {
    iStack_37b58 = 0;
  }
  else {
    (**(code **)(_Plat_SetBenchmarkMode + 0x50))
              (_Plat_SetBenchmarkMode,&uStack_37b6c,0,0,0,0,
               "/data/src/engine/./networkstringtable.cpp",0x7bd,
               &WriteUpdateMessage(CBaseClient*,int,bf_write&)::tm_fmt,"(%s)%s","Networking",
               "CNetworkStringTableContainer::WriteUpdateMessage");
    iStack_37b58 = _Plat_SetBenchmarkMode;
  }
  iVar6 = _DAT_0040b9d4;
  uStack_37b60 = uStack_37b6c;
  uStack_37b5c = uStack_37b68;
                    /* try { // try from 001a7f0e to 001a7f6e has its CatchHandler @ 001a7ff6 */
  if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
     (iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
    if ((char *)*_DAT_0040b030 != "CNetworkStringTableContainer::WriteUpdateMessage") {
      _DAT_0040b030 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2b9ca8,(char *)0x0,0x2a6193);
    }
    puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0040b02c = '\0';
  }
  if (0 < *(int *)(this + 0x1c)) {
    iVar6 = 0;
    do {
                    /* try { // try from 001a7cb5 to 001a7e7a has its CatchHandler @ 001a7fcd */
      while ((this_00 = (CNetworkStringTable *)(**(code **)(*(int *)this + 0x14))(this,iVar6),
             this_00 == (CNetworkStringTable *)0x0 ||
             (cVar3 = (**(code **)(*(int *)this_00 + 0x20))(this_00,param_2), cVar3 == '\0'))) {
LAB_001a7ca0:
        iVar6 = iVar6 + 1;
        if (*(int *)(this + 0x1c) <= iVar6) goto LAB_001a7e90;
      }
      uStack_37b48 = 0;
      uStack_37b44 = 0;
      uStack_37b40 = 0;
      uStack_37b3c = 0;
      uStack_37b38 = 0;
      uStack_37b34 = 0;
      uStack_37b30 = 0;
      uStack_37b2c = 0;
      uStack_37b28 = 0;
      uStack_37b24 = 0;
      uStack_37b20 = 0;
      uStack_37b1c = 0;
      uStack_37b18 = 0;
      uStack_37b14 = 0;
      uStack_37b10 = 0;
      uStack_37b50 = 1;
      uStack_37b4c = 0;
      ppuStack_37b54 = &PTR__SVC_UpdateStringTable_002a1d08;
      uStack_37af8 = 0;
      uStack_37afc = 0;
      uStack_37af4 = 0xffffffff;
      uStack_37af0 = 0;
      bf_write::bf_write(abStack_37ad8);
      bf_write::StartWriting(abStack_37ad8,auStack_37ac0,0x37aa0,0,-1);
      uStack_37b08 = (**(code **)(*(int *)this_00 + 0xc))(this_00);
      uStack_37b04 = CNetworkStringTable::WriteUpdate(this_00,param_1,abStack_37ad8,param_2);
      SVC_UpdateStringTable::WriteToBuffer((SVC_UpdateStringTable *)&ppuStack_37b54,param_3);
      if ((param_1 == (CBaseClient *)0x0) ||
         (cVar3 = CBaseClient::IsTracing(param_1), cVar3 == '\0')) goto LAB_001a7ca0;
      uVar4 = (**(code **)(*(int *)this_00 + 8))(this_00);
      CBaseClient::TraceNetworkData(param_1,param_3,"StringTable %s",uVar4);
      iVar6 = iVar6 + 1;
    } while (iVar6 < *(int *)(this + 0x1c));
  }
LAB_001a7e90:
  iVar6 = _DAT_0040b9d4;
  if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
     (iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
    }
    DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
  }
  if (iStack_37b58 != 0) {
    (**(code **)(iStack_37b58 + 0x54))(iStack_37b58,uStack_37b60,uStack_37b5c,0,0,0);
  }
  if (iVar2 != *(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)