L L4D2node

CNetworkStringTableItem::UpdateChangeList

0x001acaa0 · 353 bytes · __thiscall

_ZN23CNetworkStringTableItem16UpdateChangeListEiiPKv

Decompiled

undefined (4 params)

/* CNetworkStringTableItem::UpdateChangeList(int, int, void const*) */

void __thiscall
CNetworkStringTableItem::UpdateChangeList
          (CNetworkStringTableItem *this,int param_1,int param_2,void *param_3)

{
  int *piVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int local_28;
  int local_24;
  void *local_20;
  
  iVar4 = (*(int **)(this + 0x10))[3];
  if (iVar4 < 1) goto LAB_001acaf8;
  iVar3 = **(int **)(this + 0x10);
  iVar4 = iVar4 + -1;
  iVar5 = iVar4 * 0xc;
  local_28 = *(int *)(iVar3 + iVar5);
  local_24 = *(int *)(iVar3 + 4 + iVar5);
  local_20 = *(void **)(iVar3 + 8 + iVar5);
  pvVar2 = param_3;
  if (local_20 == (void *)0x0) {
joined_r0x001acc02:
    if (pvVar2 == (void *)0x0) {
      return;
    }
  }
  else if ((local_24 == param_2) && (param_3 != (void *)0x0)) {
    pvVar2 = (void *)_V_memcmp(param_3,local_20,param_2);
    goto joined_r0x001acc02;
  }
  if (local_28 == param_1) {
    if (local_20 != (void *)0x0) {
      operator_delete__(local_20);
    }
    piVar1 = *(int **)(this + 0x10);
    iVar3 = piVar1[3];
    iVar4 = (iVar3 - iVar4) + -1;
    if (0 < iVar4) {
      _V_memmove((void *)(iVar5 + *piVar1),(void *)(*piVar1 + 0xc + iVar5),iVar4 * 0xc);
      iVar3 = piVar1[3];
    }
    piVar1[3] = iVar3 + -1;
  }
LAB_001acaf8:
  local_28 = param_1;
  if ((param_3 == (void *)0x0) || (param_2 == 0)) {
    local_20 = (void *)0x0;
    local_24 = 0;
  }
  else {
    local_20 = operator_new__(param_2);
    local_24 = param_2;
    _V_memcpy(local_20,param_3,param_2);
  }
  CUtlVector<CNetworkStringTableItem::itemchange_s,CUtlMemory<CNetworkStringTableItem::itemchange_s,int>>
  ::InsertBefore(*(CUtlVector<CNetworkStringTableItem::itemchange_s,CUtlMemory<CNetworkStringTableItem::itemchange_s,int>>
                   **)(this + 0x10),
                 *(int *)(*(CUtlVector<CNetworkStringTableItem::itemchange_s,CUtlMemory<CNetworkStringTableItem::itemchange_s,int>>
                            **)(this + 0x10) + 0xc),(itemchange_s *)&local_28);
  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)