L L4D2node

DataMapInit<CWaterBullet>

0x00b5df30 · 877 bytes · __cdecl

_Z11DataMapInitI12CWaterBulletEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CWaterBullet>(CWaterBullet *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder), iVar1 != 0
     )) {
    DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder = "CWaterBullet";
    DAT_01043870 = (void *)0x0;
    DAT_01043874 = 0;
    DAT_01043878 = 0;
    DAT_0104387c = 0;
    _DAT_01043880 = (void *)0x0;
    DAT_0104386c = 0xc;
    __cxa_guard_release(&DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder,&__dso_handle);
  }
  CWaterBullet::m_DataMap._12_4_ = CBaseAnimating::m_DataMap;
  if ((DataMapInit<CWaterBullet>(CWaterBullet*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CWaterBullet>(CWaterBullet*)::dataDesc), iVar1 == 0))
  goto LAB_00b5df59;
                    /* try { // try from 00b5df9b to 00b5e241 has its CatchHandler @ 00b5e2ce */
  pcVar2 = operator_new__(DAT_0104386c + 6);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder);
  builtin_strncpy(pcVar3,"Touch",6);
  iVar4 = DAT_0104387c;
  iVar1 = DAT_0104387c + 1;
  if ((DAT_01043874 < iVar1) && (-1 < DAT_01043878)) {
    if (DAT_01043878 == 0) {
      if (DAT_01043874 == 0) {
        if (iVar1 < 9) {
          DAT_01043874 = 8;
          goto LAB_00b5e17f;
        }
        DAT_01043874 = 8;
      }
      do {
        DAT_01043874 = DAT_01043874 * 2;
      } while (DAT_01043874 < iVar1);
    }
    else {
      for (DAT_01043874 = (DAT_0104387c / DAT_01043878 + 1) * DAT_01043878; DAT_01043874 < iVar1;
          DAT_01043874 = (DAT_01043874 + iVar1) / 2) {
      }
    }
LAB_00b5e17f:
    if (DAT_01043870 == (void *)0x0) {
      DAT_01043870 = malloc(DAT_01043874 << 2);
    }
    else {
      DAT_01043870 = realloc(DAT_01043870,DAT_01043874 << 2);
      iVar1 = DAT_0104387c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_0104387c = iVar1;
  _DAT_01043880 = DAT_01043870;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01043870 + iVar5 + 4),(void *)((int)DAT_01043870 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01043870) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01043870) = pcVar2;
  }
  DataMapInit<CWaterBullet>(CWaterBullet*)::dataDesc._68_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_0104386c + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CWaterBullet>(CWaterBullet*)::nameHolder);
  builtin_strncpy(pcVar3,"BulletThink",0xc);
  iVar4 = DAT_0104387c;
  iVar1 = DAT_0104387c + 1;
  if ((DAT_01043874 < iVar1) && (-1 < DAT_01043878)) {
    if (DAT_01043878 == 0) {
      if (DAT_01043874 == 0) {
        if (iVar1 < 9) {
          DAT_01043874 = 8;
          goto LAB_00b5e1ef;
        }
        DAT_01043874 = 8;
      }
      do {
        DAT_01043874 = DAT_01043874 * 2;
      } while (DAT_01043874 < iVar1);
    }
    else {
      for (DAT_01043874 = (DAT_0104387c / DAT_01043878 + 1) * DAT_01043878; DAT_01043874 < iVar1;
          DAT_01043874 = (DAT_01043874 + iVar1) / 2) {
      }
    }
LAB_00b5e1ef:
    if (DAT_01043870 == (void *)0x0) {
      DAT_01043870 = malloc(DAT_01043874 << 2);
    }
    else {
      DAT_01043870 = realloc(DAT_01043870,DAT_01043874 << 2);
      iVar1 = DAT_0104387c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_0104387c = iVar1;
  _DAT_01043880 = DAT_01043870;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01043870 + iVar5 + 4),(void *)((int)DAT_01043870 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01043870) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01043870) = pcVar2;
  }
  DataMapInit<CWaterBullet>(CWaterBullet*)::dataDesc._132_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CWaterBullet>(CWaterBullet*)::dataDesc);
LAB_00b5df59:
  CWaterBullet::m_DataMap._4_4_ = 2;
  CWaterBullet::m_DataMap._0_4_ = 0xf6c000;
  return (datamap_t *)CWaterBullet::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)