L L4D2node

CCallQueue::~CCallQueue

0x0047b6c0 · 345 bytes · __thiscall

_ZN10CCallQueueD2Ev

Decompiled

undefined (1 param)

/* CCallQueue::~CCallQueue() */

void __thiscall CCallQueue::~CCallQueue(CCallQueue *this)

{
  int iVar1;
  int *piVar2;
  CCallQueue *pCVar3;
  int iVar4;
  undefined4 *puVar5;
  char cVar6;
  
  while( true ) {
    while( true ) {
      do {
        do {
          iVar1 = *(int *)(this + 4);
          piVar2 = *(int **)this;
          pCVar3 = (CCallQueue *)*piVar2;
        } while (pCVar3 == (CCallQueue *)0x0);
      } while (iVar1 != *(int *)(this + 4));
      if (piVar2 == *(int **)(this + 8)) break;
      if (this != pCVar3) {
        iVar4 = *(int *)(pCVar3 + 4);
        cVar6 = ThreadInterlockedAssignIf64(this,pCVar3,iVar1 + 1,piVar2,iVar1);
        if (cVar6 != '\0') {
          LOCK();
          *(int *)(this + 0x10) = *(int *)(this + 0x10) + -1;
          UNLOCK();
          piVar2[1] = iVar4;
          operator_delete(piVar2);
        }
      }
    }
    if (this == pCVar3) break;
    ThreadInterlockedAssignIf64
              (this + 8,pCVar3,*(int *)(this + 0xc) + 1,piVar2,*(int *)(this + 0xc));
  }
  while( true ) {
    puVar5 = *(undefined4 **)(this + 0x18);
    if (puVar5 == (undefined4 *)0x0) break;
    cVar6 = ThreadInterlockedAssignIf64
                      (this + 0x18,*puVar5,*(int *)(this + 0x1c) + -1,puVar5,*(int *)(this + 0x1c));
    if (cVar6 != '\0') {
      operator_delete(puVar5);
    }
  }
  *(undefined4 *)(this + 0xc) = 0;
  *(undefined4 *)(this + 4) = 0;
  operator_delete(*(void **)this);
  do {
    if (*(int *)(this + 0x18) == 0) {
      return;
    }
    cVar6 = ThreadInterlockedAssignIf64
                      (this + 0x18,0,*(uint *)(this + 0x1c) & 0xffff0000,*(int *)(this + 0x18),
                       *(uint *)(this + 0x1c));
  } while (cVar6 == '\0');
  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)