L L4D2node

DataMapInit<CPhysImpact>

0x0079fd80 · 561 bytes · __cdecl

_Z11DataMapInitI11CPhysImpactEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CPhysImpact>(CPhysImpact *param_1)

{
  int iVar1;
  char *__dest;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if ((DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder), iVar1 != 0))
  {
    DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder = "CPhysImpact";
    DAT_00fed744 = (void *)0x0;
    DAT_00fed748 = 0;
    DAT_00fed74c = 0;
    DAT_00fed750 = 0;
    _DAT_00fed754 = (void *)0x0;
    _DAT_00fed740 = 0xb;
    __cxa_guard_release(&DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder,&__dso_handle);
  }
  CPhysImpact::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if ((DataMapInit<CPhysImpact>(CPhysImpact*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysImpact>(CPhysImpact*)::dataDesc), iVar1 == 0))
  goto LAB_0079fda9;
                    /* try { // try from 0079fdeb to 0079ff19 has its CatchHandler @ 0079ffc9 */
  __dest = operator_new__(_DAT_00fed740 + 0xe);
  pcVar2 = stpcpy(__dest,DataMapInit<CPhysImpact>(CPhysImpact*)::nameHolder);
  builtin_strncpy(pcVar2,"PointAtEntity",0xe);
  iVar3 = DAT_00fed750;
  iVar1 = DAT_00fed750 + 1;
  if ((DAT_00fed748 < iVar1) && (-1 < DAT_00fed74c)) {
    if (DAT_00fed74c == 0) {
      if (DAT_00fed748 == 0) {
        if (iVar1 < 9) {
          DAT_00fed748 = 8;
          goto LAB_0079ff5f;
        }
        DAT_00fed748 = 8;
      }
      do {
        DAT_00fed748 = DAT_00fed748 * 2;
      } while (DAT_00fed748 < iVar1);
    }
    else {
      for (DAT_00fed748 = (DAT_00fed750 / DAT_00fed74c + 1) * DAT_00fed74c; DAT_00fed748 < iVar1;
          DAT_00fed748 = (DAT_00fed748 + iVar1) / 2) {
      }
    }
LAB_0079ff5f:
    if (DAT_00fed744 == (void *)0x0) {
      DAT_00fed744 = malloc(DAT_00fed748 << 2);
    }
    else {
      DAT_00fed744 = realloc(DAT_00fed744,DAT_00fed748 << 2);
      iVar1 = DAT_00fed750 + 1;
    }
  }
  iVar4 = iVar3 * 4;
  iVar3 = (iVar1 - iVar3) + -1;
  DAT_00fed750 = iVar1;
  _DAT_00fed754 = DAT_00fed744;
  if (0 < iVar3) {
    _V_memmove((void *)((int)DAT_00fed744 + iVar4 + 4),(void *)((int)DAT_00fed744 + iVar4),iVar3 * 4
              );
  }
  if ((undefined4 *)(iVar4 + (int)DAT_00fed744) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar4 + (int)DAT_00fed744) = __dest;
  }
  DataMapInit<CPhysImpact>(CPhysImpact*)::dataDesc._260_4_ = __dest;
  __cxa_guard_release(&DataMapInit<CPhysImpact>(CPhysImpact*)::dataDesc);
LAB_0079fda9:
  CPhysImpact::m_DataMap._4_4_ = 5;
  CPhysImpact::m_DataMap._0_4_ = 0xf49fc0;
  return (datamap_t *)CPhysImpact::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)