L L4D2node

DataMapInit<CGlobalState>

0x006d6cf0 · 292 bytes · __cdecl

_Z11DataMapInitI12CGlobalStateEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CGlobalState>(CGlobalState *param_1)

{
  int iVar1;
  
  if (DataMapInit<CGlobalState>(CGlobalState*)::nameHolder == '\0') {
    iVar1 = __cxa_guard_acquire(&DataMapInit<CGlobalState>(CGlobalState*)::nameHolder);
    if (iVar1 != 0) {
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._0_4_ = s_CGlobalState_00c932bf;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._8_4_ = 0;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._12_4_ = 0;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._16_4_ = 0;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._20_4_ = 0;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._24_4_ = 0;
      DataMapInit<CGlobalState>(CGlobalState*)::nameHolder._4_4_ = 0xc;
      __cxa_guard_release(&DataMapInit<CGlobalState>(CGlobalState*)::nameHolder);
      __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                   DataMapInit<CGlobalState>(CGlobalState*)::nameHolder,&__dso_handle);
    }
  }
  _DAT_00f3c564 = 0;
  if (DataMapInit<CGlobalState>(CGlobalState*)::dataDesc == '\0') {
    iVar1 = __cxa_guard_acquire(&DataMapInit<CGlobalState>(CGlobalState*)::dataDesc);
    if (iVar1 != 0) {
      if (CUtlVectorDataopsInstantiator<10>::
          GetDataOps<CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>>(CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>*)
          ::ops == '\0') {
        iVar1 = __cxa_guard_acquire(&CUtlVectorDataopsInstantiator<10>::
                                     GetDataOps<CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>>(CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>*)
                                     ::ops);
        if (iVar1 != 0) {
          CUtlVectorDataopsInstantiator<10>::
          GetDataOps<CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>>(CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>*)
          ::ops = &PTR_Save_00c93498;
          __cxa_guard_release(&CUtlVectorDataopsInstantiator<10>::
                               GetDataOps<CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>>(CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>*)
                               ::ops);
        }
      }
      DataMapInit<CGlobalState>(CGlobalState*)::dataDesc._84_4_ =
           &CUtlVectorDataopsInstantiator<10>::
            GetDataOps<CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>>(CUtlVector<globalentity_t,CUtlMemory<globalentity_t,int>>*)
            ::ops;
      __cxa_guard_release(&DataMapInit<CGlobalState>(CGlobalState*)::dataDesc);
    }
  }
  DAT_00f3c55c = 1;
  CGlobalState::m_DataMap = 0xf3c500;
  return (datamap_t *)&CGlobalState::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)