L L4D2node

DataMapInit<CLight>

0x006e6150 · 346 bytes · __cdecl

_Z11DataMapInitI6CLightEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CLight>(CLight *param_1)

{
  char *pcVar1;
  int iVar2;
  size_t sVar3;
  char *local_10 [2];
  
  if (DataMapInit<CLight>(CLight*)::nameHolder == '\0') {
    iVar2 = __cxa_guard_acquire(&DataMapInit<CLight>(CLight*)::nameHolder);
    if (iVar2 != 0) {
      DataMapInit<CLight>(CLight*)::nameHolder = "CLight";
      _DAT_00fe4834 = 0;
      _DAT_00fe4838 = 0;
      _DAT_00fe483c = 0;
      DAT_00fe4840 = 0;
      _DAT_00fe4844 = 0;
      _DAT_00fe4830 = 6;
      __cxa_guard_release(&DataMapInit<CLight>(CLight*)::nameHolder);
      __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                   &DataMapInit<CLight>(CLight*)::nameHolder,&__dso_handle);
    }
  }
  CLight::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if (DataMapInit<CLight>(CLight*)::dataDesc == '\0') {
    iVar2 = __cxa_guard_acquire(&DataMapInit<CLight>(CLight*)::dataDesc);
    if (iVar2 != 0) {
                    /* try { // try from 006e61bb to 006e6213 has its CatchHandler @ 006e62b7 */
      local_10[0] = operator_new__(_DAT_00fe4830 + 10);
      strcpy(local_10[0],DataMapInit<CLight>(CLight*)::nameHolder);
      pcVar1 = local_10[0];
      sVar3 = strlen(local_10[0]);
      builtin_strncpy(pcVar1 + sVar3,"FadeThink",10);
      CUtlVector<char*,CUtlMemory<char*,int>>::InsertBefore
                ((CUtlVector<char*,CUtlMemory<char*,int>> *)&DAT_00fe4834,DAT_00fe4840,local_10);
      DataMapInit<CLight>(CLight*)::dataDesc._388_4_ = local_10[0];
      __cxa_guard_release(&DataMapInit<CLight>(CLight*)::dataDesc);
    }
  }
  CLight::m_DataMap._4_4_ = 0xb;
  CLight::m_DataMap._0_4_ = 0xf3cf80;
  return (datamap_t *)CLight::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)