L L4D2node

ServerDTI_Term

0x0014c1d0 · 197 bytes · unknown

_Z14ServerDTI_Termv

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ServerDTI_Term() */

void ServerDTI_Term(void)

{
  undefined4 *puVar1;
  ushort uVar2;
  undefined4 *puVar3;
  uint uVar4;
  
  if (g_pServerDTIFilename != 0) {
    ServerDTI_Flush();
    uVar4 = (uint)DAT_0039f508;
    while ((short)uVar4 != -1) {
      while( true ) {
        puVar1 = (undefined4 *)(g_DTISendTables + uVar4 * 8);
        puVar3 = (undefined4 *)*puVar1;
        uVar2 = *(ushort *)((int)puVar1 + 6);
        uVar4 = (uint)uVar2;
        if (puVar3 == (undefined4 *)0x0) break;
        if (-1 < (int)puVar3[2]) {
          if ((void *)*puVar3 != (void *)0x0) {
            free((void *)*puVar3);
            *puVar3 = 0;
          }
          puVar3[1] = 0;
        }
        operator_delete(puVar3);
        if (uVar2 == 0xffff) goto LAB_0014c239;
      }
    }
LAB_0014c239:
    CUtlLinkedList<CDTISendTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>>
    ::RemoveAll((CUtlLinkedList<CDTISendTable*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>>
                 *)&g_DTISendTables);
    CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short>::Purge
              ((CUtlMemory<UtlLinkedListElem_t<CDTISendTable*,unsigned_short>,unsigned_short> *)
               &g_DTISendTables);
    DAT_0039f512 = 0xffff;
    DAT_0039f50c = 0xffff;
    _DAT_0039f510 = 0;
    _DAT_0039f514 = g_DTISendTables;
    g_pServerDTIFilename = 0;
    g_bServerDTIEnabled = 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)