L L4D2node

DataMapInit<CSurvivorRescue>

0x00969520 · 1221 bytes · __cdecl

_Z11DataMapInitI15CSurvivorRescueEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CSurvivorRescue>(CSurvivorRescue *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder),
     iVar1 != 0)) {
    DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder = "CSurvivorRescue";
    DAT_01013084 = (void *)0x0;
    DAT_01013088 = 0;
    DAT_0101308c = 0;
    DAT_01013090 = 0;
    _DAT_01013094 = (void *)0x0;
    DAT_01013080 = 0xf;
    __cxa_guard_release(&DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder,&__dso_handle);
  }
  CSurvivorRescue::m_DataMap._12_4_ = CFlexExpresser::m_DataMap;
  if ((DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc),
     iVar1 == 0)) goto LAB_00969549;
                    /* try { // try from 0096958b to 00969959 has its CatchHandler @ 00969a30 */
  pcVar2 = operator_new__(DAT_01013080 + 10);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder);
  builtin_strncpy(pcVar3,"YellThink",10);
  iVar4 = DAT_01013090;
  iVar1 = DAT_01013090 + 1;
  if ((DAT_01013088 < iVar1) && (-1 < DAT_0101308c)) {
    if (DAT_0101308c == 0) {
      if (DAT_01013088 == 0) {
        if (iVar1 < 9) {
          DAT_01013088 = 8;
          goto LAB_00969897;
        }
        DAT_01013088 = 8;
      }
      do {
        DAT_01013088 = DAT_01013088 * 2;
      } while (DAT_01013088 < iVar1);
    }
    else {
      for (DAT_01013088 = (DAT_01013090 / DAT_0101308c + 1) * DAT_0101308c; DAT_01013088 < iVar1;
          DAT_01013088 = (DAT_01013088 + iVar1) / 2) {
      }
    }
LAB_00969897:
    if (DAT_01013084 == (void *)0x0) {
      DAT_01013084 = malloc(DAT_01013088 << 2);
    }
    else {
      DAT_01013084 = realloc(DAT_01013084,DAT_01013088 << 2);
      iVar1 = DAT_01013090 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01013090 = iVar1;
  _DAT_01013094 = DAT_01013084;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01013084 + iVar5 + 4),(void *)((int)DAT_01013084 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01013084) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01013084) = pcVar2;
  }
  DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc._196_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_01013080 + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder);
  builtin_strncpy(pcVar3,"RescueThink",0xc);
  iVar4 = DAT_01013090;
  iVar1 = DAT_01013090 + 1;
  if ((DAT_01013088 < iVar1) && (-1 < DAT_0101308c)) {
    if (DAT_0101308c == 0) {
      if (DAT_01013088 == 0) {
        if (iVar1 < 9) {
          DAT_01013088 = 8;
          goto LAB_00969907;
        }
        DAT_01013088 = 8;
      }
      do {
        DAT_01013088 = DAT_01013088 * 2;
      } while (DAT_01013088 < iVar1);
    }
    else {
      for (DAT_01013088 = (DAT_01013090 / DAT_0101308c + 1) * DAT_0101308c; DAT_01013088 < iVar1;
          DAT_01013088 = (DAT_01013088 + iVar1) / 2) {
      }
    }
LAB_00969907:
    if (DAT_01013084 == (void *)0x0) {
      DAT_01013084 = malloc(DAT_01013088 << 2);
    }
    else {
      DAT_01013084 = realloc(DAT_01013084,DAT_01013088 << 2);
      iVar1 = DAT_01013090 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01013090 = iVar1;
  _DAT_01013094 = DAT_01013084;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01013084 + iVar5 + 4),(void *)((int)DAT_01013084 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01013084) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01013084) = pcVar2;
  }
  DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc._260_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_01013080 + 0xe);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::nameHolder);
  builtin_strncpy(pcVar3,"AreaScanThink",0xe);
  iVar4 = DAT_01013090;
  iVar1 = DAT_01013090 + 1;
  if ((DAT_01013088 < iVar1) && (-1 < DAT_0101308c)) {
    if (DAT_0101308c == 0) {
      if (DAT_01013088 == 0) {
        if (iVar1 < 9) {
          DAT_01013088 = 8;
          goto LAB_009697d7;
        }
        DAT_01013088 = 8;
      }
      do {
        DAT_01013088 = DAT_01013088 * 2;
      } while (DAT_01013088 < iVar1);
    }
    else {
      for (DAT_01013088 = (DAT_01013090 / DAT_0101308c + 1) * DAT_0101308c; DAT_01013088 < iVar1;
          DAT_01013088 = (DAT_01013088 + iVar1) / 2) {
      }
    }
LAB_009697d7:
    if (DAT_01013084 == (void *)0x0) {
      DAT_01013084 = malloc(DAT_01013088 << 2);
    }
    else {
      DAT_01013084 = realloc(DAT_01013084,DAT_01013088 << 2);
      iVar1 = DAT_01013090 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_01013090 = iVar1;
  _DAT_01013094 = DAT_01013084;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_01013084 + iVar5 + 4),(void *)((int)DAT_01013084 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_01013084) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_01013084) = pcVar2;
  }
  DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc._324_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CSurvivorRescue>(CSurvivorRescue*)::dataDesc);
LAB_00969549:
  CSurvivorRescue::m_DataMap._4_4_ = 5;
  CSurvivorRescue::m_DataMap._0_4_ = 0xf60840;
  return (datamap_t *)CSurvivorRescue::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)