L L4D2node

CDmxAttribute::FreeDataMemory

0x00be0e50 · 539 bytes · __thiscall

_ZN13CDmxAttribute14FreeDataMemoryEv

Decompiled

undefined (1 param)

/* CDmxAttribute::FreeDataMemory() */

void __thiscall CDmxAttribute::FreeDataMemory(CDmxAttribute *this)

{
  int iVar1;
  CUtlMemory<QAngle,int> *this_00;
  
  iVar1 = *(int *)this;
  if (iVar1 != 0) {
    if (iVar1 - 0xfU < 0xe) {
      this_00 = *(CUtlMemory<QAngle,int> **)(this + 8);
      switch(iVar1) {
      case 0x10:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)this_00);
        break;
      case 0x11:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)this_00);
        break;
      case 0x12:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<bool,int>::Purge((CUtlMemory<bool,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<bool,int>::Purge((CUtlMemory<bool,int> *)this_00);
        break;
      case 0x13:
        CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::RemoveAll
                  ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)this_00);
        CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)this_00);
        break;
      case 0x14:
        CUtlVector<CUtlBinaryBlock,CUtlMemory<CUtlBinaryBlock,int>>::RemoveAll
                  ((CUtlVector<CUtlBinaryBlock,CUtlMemory<CUtlBinaryBlock,int>> *)this_00);
        CUtlMemory<CUtlBinaryBlock,int>::Purge((CUtlMemory<CUtlBinaryBlock,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<CUtlBinaryBlock,int>::Purge((CUtlMemory<CUtlBinaryBlock,int> *)this_00);
        break;
      case 0x15:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<DmeTime_t,int>::Purge((CUtlMemory<DmeTime_t,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<DmeTime_t,int>::Purge((CUtlMemory<DmeTime_t,int> *)this_00);
        break;
      case 0x16:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<Color,int>::Purge((CUtlMemory<Color,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<Color,int>::Purge((CUtlMemory<Color,int> *)this_00);
        break;
      case 0x17:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<Vector2D,int>::Purge((CUtlMemory<Vector2D,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<Vector2D,int>::Purge((CUtlMemory<Vector2D,int> *)this_00);
        break;
      case 0x18:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)this_00);
        break;
      case 0x19:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<Vector4D,int>::Purge((CUtlMemory<Vector4D,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<Vector4D,int>::Purge((CUtlMemory<Vector4D,int> *)this_00);
        break;
      case 0x1a:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<QAngle,int>::Purge(this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<QAngle,int>::Purge(this_00);
        break;
      case 0x1b:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<Quaternion,int>::Purge((CUtlMemory<Quaternion,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<Quaternion,int>::Purge((CUtlMemory<Quaternion,int> *)this_00);
        break;
      case 0x1c:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<VMatrix,int>::Purge((CUtlMemory<VMatrix,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<VMatrix,int>::Purge((CUtlMemory<VMatrix,int> *)this_00);
        break;
      default:
        *(undefined4 *)(this_00 + 0xc) = 0;
        CUtlMemory<CDmxElement*,int>::Purge((CUtlMemory<CDmxElement*,int> *)this_00);
        *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
        CUtlMemory<CDmxElement*,int>::Purge((CUtlMemory<CDmxElement*,int> *)this_00);
      }
    }
    else if (iVar1 - 5U < 2) {
      CUtlMemory<unsigned_char,int>::Purge(*(CUtlMemory<unsigned_char,int> **)(this + 8));
    }
    *(undefined4 *)this = 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)