L L4D2node

CParticleSystemMgr::WriteParticleConfigFile

0x00bcefc0 · 521 bytes · __thiscall

_ZN18CParticleSystemMgr23WriteParticleConfigFileEP11CDmxElementR10CUtlBufferb

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CParticleSystemMgr::WriteParticleConfigFile(CDmxElement*, CUtlBuffer&, bool) */

undefined4 __thiscall
CParticleSystemMgr::WriteParticleConfigFile
          (CParticleSystemMgr *this,CDmxElement *param_1,CUtlBuffer *param_2,bool param_3)

{
  CDmxAttribute *pCVar1;
  int *piVar2;
  undefined4 uVar3;
  int iVar4;
  CDmxElement *this_00;
  int iVar5;
  int *local_20;
  
  CDmxElement::LockForChanges(param_1,true);
                    /* try { // try from 00bceff2 to 00bcf008 has its CatchHandler @ 00bcf201 */
  pCVar1 = (CDmxAttribute *)CDmxElement::AddAttribute(param_1,"preventNameBasedLookup");
  CDmxAttribute::AllocateDataMemory(pCVar1,4);
  if (*(int *)(pCVar1 + 8) != 0) {
    *(bool *)*(int *)(pCVar1 + 8) = param_3;
  }
  if (param_1 != (CDmxElement *)0x0) {
    CDmxElement::LockForChanges(param_1,false);
  }
  piVar2 = (int *)CDmxElement::GetAttribute(param_1,"children");
  if (*piVar2 == 0xf) {
    local_20 = (int *)piVar2[2];
  }
  else {
    if (CDmxAttribute::GetArray<CDmxElement*>()::defaultArray == '\0') {
      iVar4 = __cxa_guard_acquire(&CDmxAttribute::GetArray<CDmxElement*>()::defaultArray);
      if (iVar4 != 0) {
        CDmxAttribute::GetArray<CDmxElement*>()::defaultArray = 0;
        _DAT_0105b0f0 = 0;
        _DAT_0105b0f4 = 0;
        DAT_0105b0f8 = 0;
        _DAT_0105b0fc = 0;
        __cxa_guard_release(&CDmxAttribute::GetArray<CDmxElement*>()::defaultArray);
        __cxa_atexit(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>>::~CUtlVector,
                     &CDmxAttribute::GetArray<CDmxElement*>()::defaultArray,&__dso_handle);
      }
    }
    local_20 = &CDmxAttribute::GetArray<CDmxElement*>()::defaultArray;
  }
  iVar4 = local_20[3];
  if (0 < iVar4) {
    iVar5 = 0;
    do {
      piVar2 = (int *)CDmxElement::GetAttribute(*(CDmxElement **)(*local_20 + iVar5 * 4),"child");
      if (piVar2 == (int *)0x0) {
        CDmxElement::GetValue<CDmxElement*>(char_const*)::defaultValue = 0;
        this_00 = (CDmxElement *)0x0;
      }
      else if (*piVar2 == 1) {
        this_00 = *(CDmxElement **)piVar2[2];
      }
      else {
        CDmxAttribute::GetValue<CDmxElement*>()::defaultValue = 0;
        this_00 = (CDmxElement *)0x0;
      }
      CDmxElement::LockForChanges(this_00,true);
                    /* try { // try from 00bcf09f to 00bcf0b5 has its CatchHandler @ 00bcf1e3 */
      pCVar1 = (CDmxAttribute *)CDmxElement::AddAttribute(this_00,"preventNameBasedLookup");
      CDmxAttribute::AllocateDataMemory(pCVar1,4);
      if (*(int *)(pCVar1 + 8) != 0) {
        *(bool *)*(int *)(pCVar1 + 8) = param_3;
      }
      if (this_00 != (CDmxElement *)0x0) {
        CDmxElement::LockForChanges(this_00,false);
      }
      iVar5 = iVar5 + 1;
    } while (iVar5 != iVar4);
  }
  uVar3 = SerializeDMX(param_2,param_1,(char *)0x0);
  CleanupDMX(param_1);
  return uVar3;
}

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)