L L4D2node

DataMapInit<CFuncExtinguisher>

0x00b1d720 · 559 bytes · __cdecl

_Z11DataMapInitI17CFuncExtinguisherEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*) */

datamap_t * DataMapInit<CFuncExtinguisher>(CFuncExtinguisher *param_1)

{
  int iVar1;
  char *__dest;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if ((DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder),
     iVar1 != 0)) {
    DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder = "CFuncExtinguisher";
    DAT_010346bc = (void *)0x0;
    DAT_010346c0 = 0;
    DAT_010346c4 = 0;
    DAT_010346c8 = 0;
    _DAT_010346cc = (void *)0x0;
    _DAT_010346b8 = 0x11;
    __cxa_guard_release(&DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder,&__dso_handle);
  }
  CFuncExtinguisher::m_DataMap._12_4_ = CBaseTrigger::m_DataMap;
  if ((DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::dataDesc),
     iVar1 == 0)) goto LAB_00b1d749;
                    /* try { // try from 00b1d78b to 00b1d8b9 has its CatchHandler @ 00b1d969 */
  __dest = operator_new__(_DAT_010346b8 + 0x10);
  pcVar2 = stpcpy(__dest,DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::nameHolder);
  builtin_strncpy(pcVar2,"ExtinguishThink",0x10);
  iVar3 = DAT_010346c8;
  iVar1 = DAT_010346c8 + 1;
  if ((DAT_010346c0 < iVar1) && (-1 < DAT_010346c4)) {
    if (DAT_010346c4 == 0) {
      if (DAT_010346c0 == 0) {
        if (iVar1 < 9) {
          DAT_010346c0 = 8;
          goto LAB_00b1d8ff;
        }
        DAT_010346c0 = 8;
      }
      do {
        DAT_010346c0 = DAT_010346c0 * 2;
      } while (DAT_010346c0 < iVar1);
    }
    else {
      for (DAT_010346c0 = (DAT_010346c8 / DAT_010346c4 + 1) * DAT_010346c4; DAT_010346c0 < iVar1;
          DAT_010346c0 = (DAT_010346c0 + iVar1) / 2) {
      }
    }
LAB_00b1d8ff:
    if (DAT_010346bc == (void *)0x0) {
      DAT_010346bc = malloc(DAT_010346c0 << 2);
    }
    else {
      DAT_010346bc = realloc(DAT_010346bc,DAT_010346c0 << 2);
      iVar1 = DAT_010346c8 + 1;
    }
  }
  iVar4 = iVar3 * 4;
  iVar3 = (iVar1 - iVar3) + -1;
  DAT_010346c8 = iVar1;
  _DAT_010346cc = DAT_010346bc;
  if (0 < iVar3) {
    _V_memmove((void *)((int)DAT_010346bc + iVar4 + 4),(void *)((int)DAT_010346bc + iVar4),iVar3 * 4
              );
  }
  if ((undefined4 *)(iVar4 + (int)DAT_010346bc) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar4 + (int)DAT_010346bc) = __dest;
  }
  DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::dataDesc._68_4_ = __dest;
  __cxa_guard_release(&DataMapInit<CFuncExtinguisher>(CFuncExtinguisher*)::dataDesc);
LAB_00b1d749:
  CFuncExtinguisher::m_DataMap._4_4_ = 1;
  CFuncExtinguisher::m_DataMap._0_4_ = 0xf63320;
  return (datamap_t *)CFuncExtinguisher::m_DataMap;
}

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)