L L4D2node

DataMapInit<CProjectedDecal>

0x00b624a0 · 886 bytes · __cdecl

_Z11DataMapInitI15CProjectedDecalEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CProjectedDecal>(CProjectedDecal *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder),
     iVar1 != 0)) {
    DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder = "CProjectedDecal";
    DAT_0104415c = (void *)0x0;
    DAT_01044160 = 0;
    DAT_01044164 = 0;
    DAT_01044168 = 0;
    _DAT_0104416c = (void *)0x0;
    DAT_01044158 = 0xf;
    __cxa_guard_release(&DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder,&__dso_handle);
  }
  CProjectedDecal::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if ((DataMapInit<CProjectedDecal>(CProjectedDecal*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CProjectedDecal>(CProjectedDecal*)::dataDesc),
     iVar1 == 0)) goto LAB_00b624c9;
                    /* try { // try from 00b6250b to 00b627c1 has its CatchHandler @ 00b6284e */
  pcVar2 = operator_new__(DAT_01044158 + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder);
  builtin_strncpy(pcVar3,"StaticDecal",0xc);
  iVar4 = DAT_01044168;
  iVar1 = DAT_01044168 + 1;
  if ((DAT_01044160 < iVar1) && (-1 < DAT_01044164)) {
    if (DAT_01044164 == 0) {
      if (DAT_01044160 == 0) {
        if (iVar1 < 9) {
          DAT_01044160 = 8;
          goto LAB_00b626ff;
        }
        DAT_01044160 = 8;
      }
      do {
        DAT_01044160 = DAT_01044160 * 2;
      } while (DAT_01044160 < iVar1);
    }
    else {
      for (DAT_01044160 = (DAT_01044168 / DAT_01044164 + 1) * DAT_01044164; DAT_01044160 < iVar1;
          DAT_01044160 = (DAT_01044160 + iVar1) / 2) {
      }
    }
LAB_00b626ff:
    if (DAT_0104415c == (void *)0x0) {
      DAT_0104415c = malloc(DAT_01044160 << 2);
    }
    else {
      DAT_0104415c = realloc(DAT_0104415c,DAT_01044160 << 2);
      iVar1 = DAT_01044168 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01044168 = iVar1;
  _DAT_0104416c = DAT_0104415c;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_0104415c + iVar5 + 4),(void *)((int)DAT_0104415c + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_0104415c) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_0104415c) = pcVar2;
  }
  DataMapInit<CProjectedDecal>(CProjectedDecal*)::dataDesc._196_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_01044158 + 0xd);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CProjectedDecal>(CProjectedDecal*)::nameHolder);
  builtin_strncpy(pcVar3,"TriggerDecal",0xd);
  iVar4 = DAT_01044168;
  iVar1 = DAT_01044168 + 1;
  if ((DAT_01044160 < iVar1) && (-1 < DAT_01044164)) {
    if (DAT_01044164 == 0) {
      if (DAT_01044160 == 0) {
        if (iVar1 < 9) {
          DAT_01044160 = 8;
          goto LAB_00b6276f;
        }
        DAT_01044160 = 8;
      }
      do {
        DAT_01044160 = DAT_01044160 * 2;
      } while (DAT_01044160 < iVar1);
    }
    else {
      for (DAT_01044160 = (DAT_01044168 / DAT_01044164 + 1) * DAT_01044164; DAT_01044160 < iVar1;
          DAT_01044160 = (DAT_01044160 + iVar1) / 2) {
      }
    }
LAB_00b6276f:
    if (DAT_0104415c == (void *)0x0) {
      DAT_0104415c = malloc(DAT_01044160 << 2);
    }
    else {
      DAT_0104415c = realloc(DAT_0104415c,DAT_01044160 << 2);
      iVar1 = DAT_01044168 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01044168 = iVar1;
  _DAT_0104416c = DAT_0104415c;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_0104415c + iVar5 + 4),(void *)((int)DAT_0104415c + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_0104415c) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_0104415c) = pcVar2;
  }
  DataMapInit<CProjectedDecal>(CProjectedDecal*)::dataDesc._260_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CProjectedDecal>(CProjectedDecal*)::dataDesc);
LAB_00b624c9:
  CProjectedDecal::m_DataMap._4_4_ = 5;
  CProjectedDecal::m_DataMap._0_4_ = 0xf6cc40;
  return (datamap_t *)CProjectedDecal::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)