L L4D2node

DataMapInit<CPhysBox>

0x0079e8f0 · 603 bytes · __cdecl

_Z11DataMapInitI8CPhysBoxEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CPhysBox>(CPhysBox *param_1)

{
  int iVar1;
  char *__dest;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if ((DataMapInit<CPhysBox>(CPhysBox*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysBox>(CPhysBox*)::nameHolder), iVar1 != 0)) {
    DataMapInit<CPhysBox>(CPhysBox*)::nameHolder = "CPhysBox";
    DAT_00fed77c = (void *)0x0;
    DAT_00fed780 = 0;
    DAT_00fed784 = 0;
    DAT_00fed788 = 0;
    _DAT_00fed78c = (void *)0x0;
    _DAT_00fed778 = 8;
    __cxa_guard_release(&DataMapInit<CPhysBox>(CPhysBox*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CPhysBox>(CPhysBox*)::nameHolder,&__dso_handle);
  }
  CPhysBox::m_DataMap._12_4_ = CBreakable::m_DataMap;
  if ((DataMapInit<CPhysBox>(CPhysBox*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysBox>(CPhysBox*)::dataDesc), iVar1 == 0))
  goto LAB_0079e919;
                    /* try { // try from 0079e95b to 0079eab9 has its CatchHandler @ 0079eb69 */
  __dest = operator_new__(_DAT_00fed778 + 0xb);
  pcVar2 = stpcpy(__dest,DataMapInit<CPhysBox>(CPhysBox*)::nameHolder);
  builtin_strncpy(pcVar2,"BreakTouch",0xb);
  iVar3 = DAT_00fed788;
  iVar1 = DAT_00fed788 + 1;
  if ((DAT_00fed780 < iVar1) && (-1 < DAT_00fed784)) {
    if (DAT_00fed784 == 0) {
      if (DAT_00fed780 == 0) {
        if (iVar1 < 9) {
          DAT_00fed780 = 8;
          goto LAB_0079eaff;
        }
        DAT_00fed780 = 8;
      }
      do {
        DAT_00fed780 = DAT_00fed780 * 2;
      } while (DAT_00fed780 < iVar1);
    }
    else {
      for (DAT_00fed780 = (DAT_00fed788 / DAT_00fed784 + 1) * DAT_00fed784; DAT_00fed780 < iVar1;
          DAT_00fed780 = (DAT_00fed780 + iVar1) / 2) {
      }
    }
LAB_0079eaff:
    if (DAT_00fed77c == (void *)0x0) {
      DAT_00fed77c = malloc(DAT_00fed780 << 2);
    }
    else {
      DAT_00fed77c = realloc(DAT_00fed77c,DAT_00fed780 << 2);
      iVar1 = DAT_00fed788 + 1;
    }
  }
  iVar4 = iVar3 * 4;
  iVar3 = (iVar1 - iVar3) + -1;
  DAT_00fed788 = iVar1;
  _DAT_00fed78c = DAT_00fed77c;
  if (0 < iVar3) {
    _V_memmove((void *)((int)DAT_00fed77c + iVar4 + 4),(void *)((int)DAT_00fed77c + iVar4),iVar3 * 4
              );
  }
  if ((undefined4 *)(iVar4 + (int)DAT_00fed77c) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar4 + (int)DAT_00fed77c) = __dest;
  }
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1108_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1172_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1236_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1300_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1364_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1428_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1492_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1556_4_ = eventFuncs;
  DataMapInit<CPhysBox>(CPhysBox*)::dataDesc._1028_4_ = __dest;
  __cxa_guard_release(&DataMapInit<CPhysBox>(CPhysBox*)::dataDesc);
LAB_0079e919:
  CPhysBox::m_DataMap._4_4_ = 0x18;
  CPhysBox::m_DataMap._0_4_ = 0xf4a300;
  return (datamap_t *)CPhysBox::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)