L L4D2node

DataMapInit<CTriggerHurt>

0x00b16e80 · 1299 bytes · __cdecl

_Z11DataMapInitI12CTriggerHurtEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CTriggerHurt>(CTriggerHurt *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder), iVar1 != 0
     )) {
    DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder = "CTriggerHurt";
    DAT_01034d64 = (void *)0x0;
    DAT_01034d68 = 0;
    DAT_01034d6c = 0;
    DAT_01034d70 = 0;
    _DAT_01034d74 = (void *)0x0;
    DAT_01034d60 = 0xc;
    __cxa_guard_release(&DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder,&__dso_handle);
  }
  CTriggerHurt::m_DataMap._12_4_ = CBaseTrigger::m_DataMap;
  if ((DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc), iVar1 == 0))
  goto LAB_00b16ea9;
                    /* try { // try from 00b16eeb to 00b17269 has its CatchHandler @ 00b173e0 */
  pcVar2 = operator_new__(DAT_01034d60 + 0xf);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder);
  builtin_strncpy(pcVar3,"RadiationThink",0xf);
  iVar4 = DAT_01034d70;
  iVar1 = DAT_01034d70 + 1;
  if ((DAT_01034d68 < iVar1) && (-1 < DAT_01034d6c)) {
    if (DAT_01034d6c == 0) {
      if (DAT_01034d68 == 0) {
        if (iVar1 < 9) {
          DAT_01034d68 = 8;
          goto LAB_00b172af;
        }
        DAT_01034d68 = 8;
      }
      do {
        DAT_01034d68 = DAT_01034d68 * 2;
      } while (DAT_01034d68 < iVar1);
    }
    else {
      for (DAT_01034d68 = (DAT_01034d70 / DAT_01034d6c + 1) * DAT_01034d6c; DAT_01034d68 < iVar1;
          DAT_01034d68 = (DAT_01034d68 + iVar1) / 2) {
      }
    }
LAB_00b172af:
    if (DAT_01034d64 == (void *)0x0) {
      DAT_01034d64 = malloc(DAT_01034d68 << 2);
    }
    else {
      DAT_01034d64 = realloc(DAT_01034d64,DAT_01034d68 << 2);
      iVar1 = DAT_01034d70 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01034d70 = iVar1;
  _DAT_01034d74 = DAT_01034d64;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01034d64 + iVar5 + 4),(void *)((int)DAT_01034d64 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01034d64) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01034d64) = pcVar2;
  }
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._68_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_01034d60 + 10);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder);
  builtin_strncpy(pcVar3,"HurtThink",10);
  iVar4 = DAT_01034d70;
  iVar1 = DAT_01034d70 + 1;
  if ((DAT_01034d68 < iVar1) && (-1 < DAT_01034d6c)) {
    if (DAT_01034d6c == 0) {
      if (DAT_01034d68 == 0) {
        if (iVar1 < 9) {
          DAT_01034d68 = 8;
          goto LAB_00b17217;
        }
        DAT_01034d68 = 8;
      }
      do {
        DAT_01034d68 = DAT_01034d68 * 2;
      } while (DAT_01034d68 < iVar1);
    }
    else {
      for (DAT_01034d68 = (DAT_01034d70 / DAT_01034d6c + 1) * DAT_01034d6c; DAT_01034d68 < iVar1;
          DAT_01034d68 = (DAT_01034d68 + iVar1) / 2) {
      }
    }
LAB_00b17217:
    if (DAT_01034d64 == (void *)0x0) {
      DAT_01034d64 = malloc(DAT_01034d68 << 2);
    }
    else {
      DAT_01034d64 = realloc(DAT_01034d64,DAT_01034d68 << 2);
      iVar1 = DAT_01034d70 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01034d70 = iVar1;
  _DAT_01034d74 = DAT_01034d64;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01034d64 + iVar5 + 4),(void *)((int)DAT_01034d64 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01034d64) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01034d64) = pcVar2;
  }
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._132_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_01034d60 + 9);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CTriggerHurt>(CTriggerHurt*)::nameHolder);
  builtin_strncpy(pcVar3,"NavThink",9);
  iVar4 = DAT_01034d70;
  iVar1 = DAT_01034d70 + 1;
  if ((DAT_01034d68 < iVar1) && (-1 < DAT_01034d6c)) {
    if (DAT_01034d6c == 0) {
      if (DAT_01034d68 == 0) {
        if (iVar1 < 9) {
          DAT_01034d68 = 8;
          goto LAB_00b1717f;
        }
        DAT_01034d68 = 8;
      }
      do {
        DAT_01034d68 = DAT_01034d68 * 2;
      } while (DAT_01034d68 < iVar1);
    }
    else {
      for (DAT_01034d68 = (DAT_01034d70 / DAT_01034d6c + 1) * DAT_01034d6c; DAT_01034d68 < iVar1;
          DAT_01034d68 = (DAT_01034d68 + iVar1) / 2) {
      }
    }
LAB_00b1717f:
    if (DAT_01034d64 == (void *)0x0) {
      DAT_01034d64 = malloc(DAT_01034d68 << 2);
    }
    else {
      DAT_01034d64 = realloc(DAT_01034d64,DAT_01034d68 << 2);
      iVar1 = DAT_01034d70 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01034d70 = iVar1;
  _DAT_01034d74 = DAT_01034d64;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01034d64 + iVar5 + 4),(void *)((int)DAT_01034d64 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01034d64) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01034d64) = pcVar2;
  }
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._196_4_ = pcVar2;
  if ((CUtlVectorDataopsInstantiator<13>::
       GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
       ::ops == '\0') &&
     (iVar1 = __cxa_guard_acquire(&CUtlVectorDataopsInstantiator<13>::
                                   GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
                                   ::ops), iVar1 != 0)) {
    CUtlVectorDataopsInstantiator<13>::
    GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
    ::ops = &PTR_Save_00c5bd28;
    __cxa_guard_release(&CUtlVectorDataopsInstantiator<13>::
                         GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
                         ::ops);
  }
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._916_4_ =
       &CUtlVectorDataopsInstantiator<13>::
        GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
        ::ops;
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._1044_4_ = eventFuncs;
  DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc._1108_4_ = eventFuncs;
  __cxa_guard_release(&DataMapInit<CTriggerHurt>(CTriggerHurt*)::dataDesc);
LAB_00b16ea9:
  CTriggerHurt::m_DataMap._4_4_ = 0x11;
  CTriggerHurt::m_DataMap._0_4_ = 0xf65920;
  return (datamap_t *)CTriggerHurt::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)