L L4D2node

NET_ClearLoopbackBuffers

0x001c4960 · 344 bytes · unknown

_Z24NET_ClearLoopbackBuffersv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* NET_ClearLoopbackBuffers() */

void NET_ClearLoopbackBuffers(void)

{
  int iVar1;
  undefined4 *puVar2;
  undefined8 *puVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  char cVar6;
  undefined8 *puVar7;
  
  puVar7 = (undefined8 *)&s_LoopBacks;
  do {
    while( true ) {
      while( true ) {
        do {
          do {
            iVar1 = *(int *)((int)puVar7 + 4);
            puVar2 = *(undefined4 **)puVar7;
            puVar3 = (undefined8 *)*puVar2;
          } while (puVar3 == (undefined8 *)0x0);
        } while (iVar1 != *(int *)((int)puVar7 + 4));
        if (puVar2 == *(undefined4 **)(puVar7 + 1)) break;
        if (puVar3 != puVar7) {
          puVar4 = *(undefined4 **)((int)puVar3 + 4);
          cVar6 = ThreadInterlockedAssignIf64(puVar7,puVar3,iVar1 + 1,puVar2,iVar1);
          if (cVar6 != '\0') {
            LOCK();
            *(int *)(puVar7 + 2) = *(int *)(puVar7 + 2) + -1;
            UNLOCK();
            puVar2[1] = puVar4;
            do {
              iVar1 = *(int *)((int)puVar7 + 0x1c);
              uVar5 = *(undefined4 *)(puVar7 + 3);
              *puVar2 = uVar5;
              cVar6 = ThreadInterlockedAssignIf64(puVar7 + 3,puVar2,iVar1 + 0x10001,uVar5,iVar1);
            } while (cVar6 == '\0');
            puVar2 = (undefined4 *)*puVar4;
            if ((puVar2 != (void *)0x0) && (puVar2 != puVar4 + 2)) {
              operator_delete__(puVar2);
            }
            CUtlMemoryPool::Free((CUtlMemoryPool *)loopback_t::s_Allocator,puVar4);
          }
        }
      }
      if (puVar3 == puVar7) break;
      ThreadInterlockedAssignIf64
                (puVar7 + 1,puVar3,*(int *)((int)puVar7 + 0xc) + 1,puVar2,
                 *(int *)((int)puVar7 + 0xc));
    }
    puVar7 = puVar7 + 4;
  } while (puVar7 != &net_time);
  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)