L L4D2node

DataMapInit<CFuncRotating>

0x00631c30 · 2180 bytes · __cdecl

_Z11DataMapInitI13CFuncRotatingEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CFuncRotating>(CFuncRotating *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder),
     iVar1 != 0)) {
    DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder = "CFuncRotating";
    DAT_00fc2030 = (void *)0x0;
    DAT_00fc2034 = 0;
    DAT_00fc2038 = 0;
    DAT_00fc203c = 0;
    _DAT_00fc2040 = (void *)0x0;
    DAT_00fc202c = 0xd;
    __cxa_guard_release(&DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder,&__dso_handle);
  }
  CFuncRotating::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if ((DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc), iVar1 == 0
     )) goto LAB_00631c59;
                    /* try { // try from 00631c9b to 006323a1 has its CatchHandler @ 00632536 */
  pcVar2 = operator_new__(DAT_00fc202c + 0xb);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"SpinUpMove",0xb);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_006321af;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_006321af:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._836_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc202c + 0xd);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"SpinDownMove",0xd);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_0063221f;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_0063221f:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._900_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc202c + 10);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"HurtTouch",10);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_0063234f;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_0063234f:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._964_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc202c + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"RotatingUse",0xc);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_006322b7;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_006322b7:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._1028_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc202c + 0xb);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"RotateMove",0xb);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_006320ef;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_006320ef:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._1092_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc202c + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncRotating>(CFuncRotating*)::nameHolder);
  builtin_strncpy(pcVar3,"ReverseMove",0xc);
  iVar4 = DAT_00fc203c;
  iVar1 = DAT_00fc203c + 1;
  if ((DAT_00fc2034 < iVar1) && (-1 < DAT_00fc2038)) {
    if (DAT_00fc2038 == 0) {
      if (DAT_00fc2034 == 0) {
        if (iVar1 < 9) {
          DAT_00fc2034 = 8;
          goto LAB_00632057;
        }
        DAT_00fc2034 = 8;
      }
      do {
        DAT_00fc2034 = DAT_00fc2034 * 2;
      } while (DAT_00fc2034 < iVar1);
    }
    else {
      for (DAT_00fc2034 = (DAT_00fc203c / DAT_00fc2038 + 1) * DAT_00fc2038; DAT_00fc2034 < iVar1;
          DAT_00fc2034 = (DAT_00fc2034 + iVar1) / 2) {
      }
    }
LAB_00632057:
    if (DAT_00fc2030 == (void *)0x0) {
      DAT_00fc2030 = malloc(DAT_00fc2034 << 2);
    }
    else {
      DAT_00fc2030 = realloc(DAT_00fc2030,DAT_00fc2034 << 2);
      iVar1 = DAT_00fc203c + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc203c = iVar1;
  _DAT_00fc2040 = DAT_00fc2030;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc2030 + iVar5 + 4),(void *)((int)DAT_00fc2030 + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc2030) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc2030) = pcVar2;
  }
  DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc._1156_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CFuncRotating>(CFuncRotating*)::dataDesc);
LAB_00631c59:
  CFuncRotating::m_DataMap._4_4_ = 0x1b;
  CFuncRotating::m_DataMap._0_4_ = 0xf28400;
  return (datamap_t *)CFuncRotating::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)