L L4D2node

DataMapInit<CBaseButton>

0x006354a0 · 2224 bytes · __cdecl

_Z11DataMapInitI11CBaseButtonEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CBaseButton>(CBaseButton *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CBaseButton>(CBaseButton*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CBaseButton>(CBaseButton*)::nameHolder), iVar1 != 0))
  {
    DataMapInit<CBaseButton>(CBaseButton*)::nameHolder = "CBaseButton";
    DAT_00fc26f8 = (void *)0x0;
    DAT_00fc26fc = 0;
    DAT_00fc2700 = 0;
    DAT_00fc2704 = 0;
    _DAT_00fc2708 = (void *)0x0;
    DAT_00fc26f4 = 0xb;
    __cxa_guard_release(&DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CBaseButton>(CBaseButton*)::nameHolder,&__dso_handle);
  }
  CBaseButton::m_DataMap._12_4_ = CBaseToggle::m_DataMap;
  if ((DataMapInit<CBaseButton>(CBaseButton*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CBaseButton>(CBaseButton*)::dataDesc), iVar1 == 0))
  goto LAB_006354c9;
                    /* try { // try from 0063550b to 00635c31 has its CatchHandler @ 00635dc6 */
  pcVar2 = operator_new__(DAT_00fc26f4 + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"ButtonTouch",0xc);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_00635a3f;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_00635a3f:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._900_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc26f4 + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"ButtonSpark",0xc);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_00635aaf;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_00635aaf:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._964_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc26f4 + 0xf);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"TriggerAndWait",0xf);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_00635bdf;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_00635bdf:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1028_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc26f4 + 0xd);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"ButtonReturn",0xd);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_00635b47;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_00635b47:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1092_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc26f4 + 0xf);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"ButtonBackHome",0xf);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_0063597f;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_0063597f:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1156_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc26f4 + 10);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CBaseButton>(CBaseButton*)::nameHolder);
  builtin_strncpy(pcVar3,"ButtonUse",10);
  iVar4 = DAT_00fc2704;
  iVar1 = DAT_00fc2704 + 1;
  if ((DAT_00fc26fc < iVar1) && (-1 < DAT_00fc2700)) {
    if (DAT_00fc2700 == 0) {
      if (DAT_00fc26fc == 0) {
        if (iVar1 < 9) {
          DAT_00fc26fc = 8;
          goto LAB_006358e7;
        }
        DAT_00fc26fc = 8;
      }
      do {
        DAT_00fc26fc = DAT_00fc26fc * 2;
      } while (DAT_00fc26fc < iVar1);
    }
    else {
      for (DAT_00fc26fc = (DAT_00fc2704 / DAT_00fc2700 + 1) * DAT_00fc2700; DAT_00fc26fc < iVar1;
          DAT_00fc26fc = (DAT_00fc26fc + iVar1) / 2) {
      }
    }
LAB_006358e7:
    if (DAT_00fc26f8 == (void *)0x0) {
      DAT_00fc26f8 = malloc(DAT_00fc26fc << 2);
    }
    else {
      DAT_00fc26f8 = realloc(DAT_00fc26f8,DAT_00fc26fc << 2);
      iVar1 = DAT_00fc2704 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc2704 = iVar1;
  _DAT_00fc2708 = DAT_00fc26f8;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc26f8 + iVar5 + 4),(void *)((int)DAT_00fc26f8 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc26f8) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc26f8) = pcVar2;
  }
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1620_4_ = eventFuncs;
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1684_4_ = eventFuncs;
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1748_4_ = eventFuncs;
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1812_4_ = eventFuncs;
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1876_4_ = eventFuncs;
  DataMapInit<CBaseButton>(CBaseButton*)::dataDesc._1220_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CBaseButton>(CBaseButton*)::dataDesc);
LAB_006354c9:
  CBaseButton::m_DataMap._4_4_ = 0x1d;
  CBaseButton::m_DataMap._0_4_ = 0xf298c0;
  return (datamap_t *)CBaseButton::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)