L L4D2node

CUtlLinkedList<CDTISendTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>>::LinkBefore

0x0014c590 · 257 bytes · __thiscall

_ZN14CUtlLinkedListIP13CDTISendTabletLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS1_tEtEE10LinkBeforeEtt

Decompiled

undefined (3 params)

/* CUtlLinkedList<CDTISendTable*, unsigned short, false, unsigned short,
   CUtlMemory<UtlLinkedListElem_t<CDTISendTable*, unsigned short>, unsigned short>
   >::LinkBefore(unsigned short, unsigned short) */

void __thiscall
CUtlLinkedList<CDTISendTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>>
::LinkBefore(CUtlLinkedList<CDTISendTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>>
             *this,ushort param_1,ushort param_2)

{
  ushort uVar1;
  uint uVar2;
  int iVar3;
  int local_18;
  
  uVar2 = (uint)param_2;
  if (((int)uVar2 < *(int *)(this + 4)) && (param_2 <= *(ushort *)(this + 0x16))) {
    local_18 = uVar2 * 8;
    iVar3 = local_18 + *(int *)this;
    uVar1 = *(ushort *)(iVar3 + 4);
    if (param_2 != uVar1) {
      if (uVar1 == 0xffff) {
        *(undefined2 *)(this + 0xc) = *(undefined2 *)(iVar3 + 6);
      }
      else {
        *(undefined2 *)(*(int *)this + 6 + (uint)uVar1 * 8) = *(undefined2 *)(iVar3 + 6);
      }
      if (*(ushort *)(iVar3 + 6) == 0xffff) {
        *(undefined2 *)(this + 0xe) = *(undefined2 *)(iVar3 + 4);
      }
      else {
        *(undefined2 *)(*(int *)this + 4 + (uint)*(ushort *)(iVar3 + 6) * 8) =
             *(undefined2 *)(iVar3 + 4);
      }
      *(ushort *)(iVar3 + 6) = param_2;
      *(ushort *)(iVar3 + 4) = param_2;
      *(short *)(this + 0x12) = *(short *)(this + 0x12) + -1;
      goto LAB_0014c5b9;
    }
  }
  local_18 = uVar2 << 3;
LAB_0014c5b9:
  local_18 = local_18 + *(int *)this;
  *(ushort *)(local_18 + 6) = param_1;
  if (param_1 == 0xffff) {
    uVar1 = *(ushort *)(this + 0xe);
    *(ushort *)(local_18 + 4) = uVar1;
    *(ushort *)(this + 0xe) = param_2;
  }
  else {
    iVar3 = *(int *)this + (uint)param_1 * 8;
    uVar1 = *(ushort *)(iVar3 + 4);
    *(ushort *)(local_18 + 4) = uVar1;
    *(ushort *)(iVar3 + 4) = param_2;
  }
  if (uVar1 != 0xffff) {
    *(ushort *)(*(int *)this + 6 + (uint)uVar1 * 8) = param_2;
    *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
    return;
  }
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  *(ushort *)(this + 0xc) = param_2;
  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)