L L4D2node

DataMapInit<CBreakable>

0x006b2850 · 889 bytes · __cdecl

_Z11DataMapInitI10CBreakableEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CBreakable>(CBreakable *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CBreakable>(CBreakable*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CBreakable>(CBreakable*)::nameHolder), iVar1 != 0)) {
    DataMapInit<CBreakable>(CBreakable*)::nameHolder = "CBreakable";
    DAT_00fe06b0 = (void *)0x0;
    DAT_00fe06b4 = 0;
    DAT_00fe06b8 = 0;
    DAT_00fe06bc = 0;
    _DAT_00fe06c0 = (void *)0x0;
    DAT_00fe06ac = 10;
    __cxa_guard_release(&DataMapInit<CBreakable>(CBreakable*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CBreakable>(CBreakable*)::nameHolder,&__dso_handle);
  }
  CBreakable::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if ((DataMapInit<CBreakable>(CBreakable*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CBreakable>(CBreakable*)::dataDesc), iVar1 == 0))
  goto LAB_006b2879;
                    /* try { // try from 006b28bb to 006b2b71 has its CatchHandler @ 006b2bfe */
  pcVar2 = operator_new__(DAT_00fe06ac + 0xb);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBreakable>(CBreakable*)::nameHolder);
  builtin_strncpy(pcVar3,"BreakTouch",0xb);
  iVar4 = DAT_00fe06bc;
  iVar1 = DAT_00fe06bc + 1;
  if ((DAT_00fe06b4 < iVar1) && (-1 < DAT_00fe06b8)) {
    if (DAT_00fe06b8 == 0) {
      if (DAT_00fe06b4 == 0) {
        if (iVar1 < 9) {
          DAT_00fe06b4 = 8;
          goto LAB_006b2aaf;
        }
        DAT_00fe06b4 = 8;
      }
      do {
        DAT_00fe06b4 = DAT_00fe06b4 * 2;
      } while (DAT_00fe06b4 < iVar1);
    }
    else {
      for (DAT_00fe06b4 = (DAT_00fe06bc / DAT_00fe06b8 + 1) * DAT_00fe06b8; DAT_00fe06b4 < iVar1;
          DAT_00fe06b4 = (DAT_00fe06b4 + iVar1) / 2) {
      }
    }
LAB_006b2aaf:
    if (DAT_00fe06b0 == (void *)0x0) {
      DAT_00fe06b0 = malloc(DAT_00fe06b4 << 2);
    }
    else {
      DAT_00fe06b0 = realloc(DAT_00fe06b0,DAT_00fe06b4 << 2);
      iVar1 = DAT_00fe06bc + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fe06bc = iVar1;
  _DAT_00fe06c0 = DAT_00fe06b0;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fe06b0 + iVar5 + 4),(void *)((int)DAT_00fe06b0 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fe06b0) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fe06b0) = pcVar2;
  }
  DataMapInit<CBreakable>(CBreakable*)::dataDesc._1348_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fe06ac + 4);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBreakable>(CBreakable*)::nameHolder);
  builtin_strncpy(pcVar3,"Die",4);
  iVar4 = DAT_00fe06bc;
  iVar1 = DAT_00fe06bc + 1;
  if ((DAT_00fe06b4 < iVar1) && (-1 < DAT_00fe06b8)) {
    if (DAT_00fe06b8 == 0) {
      if (DAT_00fe06b4 == 0) {
        if (iVar1 < 9) {
          DAT_00fe06b4 = 8;
          goto LAB_006b2b1f;
        }
        DAT_00fe06b4 = 8;
      }
      do {
        DAT_00fe06b4 = DAT_00fe06b4 * 2;
      } while (DAT_00fe06b4 < iVar1);
    }
    else {
      for (DAT_00fe06b4 = (DAT_00fe06bc / DAT_00fe06b8 + 1) * DAT_00fe06b8; DAT_00fe06b4 < iVar1;
          DAT_00fe06b4 = (DAT_00fe06b4 + iVar1) / 2) {
      }
    }
LAB_006b2b1f:
    if (DAT_00fe06b0 == (void *)0x0) {
      DAT_00fe06b0 = malloc(DAT_00fe06b4 << 2);
    }
    else {
      DAT_00fe06b0 = realloc(DAT_00fe06b0,DAT_00fe06b4 << 2);
      iVar1 = DAT_00fe06bc + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fe06bc = iVar1;
  _DAT_00fe06c0 = DAT_00fe06b0;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fe06b0 + iVar5 + 4),(void *)((int)DAT_00fe06b0 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fe06b0) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fe06b0) = pcVar2;
  }
  DataMapInit<CBreakable>(CBreakable*)::dataDesc._1492_4_ = eventFuncs;
  DataMapInit<CBreakable>(CBreakable*)::dataDesc._1556_4_ = eventFuncs;
  DataMapInit<CBreakable>(CBreakable*)::dataDesc._1412_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CBreakable>(CBreakable*)::dataDesc);
LAB_006b2879:
  CBreakable::m_DataMap._4_4_ = 0x27;
  CBreakable::m_DataMap._0_4_ = 0xf39040;
  return (datamap_t *)CBreakable::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)