L L4D2node

DataMapInit<CColorCorrection>

0x006459d0 · 886 bytes · __cdecl

_Z11DataMapInitI16CColorCorrectionEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

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

datamap_t * DataMapInit<CColorCorrection>(CColorCorrection *param_1)

{
  int iVar1;
  char *pcVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  
  if ((DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder == '\0') &&
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder),
     iVar1 != 0)) {
    DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder = "CColorCorrection";
    DAT_00fc398c = (void *)0x0;
    DAT_00fc3990 = 0;
    DAT_00fc3994 = 0;
    DAT_00fc3998 = 0;
    _DAT_00fc399c = (void *)0x0;
    DAT_00fc3988 = 0x10;
    __cxa_guard_release(&DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder);
    __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                 &DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder,&__dso_handle);
  }
  CColorCorrection::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if ((DataMapInit<CColorCorrection>(CColorCorrection*)::dataDesc != '\0') ||
     (iVar1 = __cxa_guard_acquire(&DataMapInit<CColorCorrection>(CColorCorrection*)::dataDesc),
     iVar1 == 0)) goto LAB_006459f9;
                    /* try { // try from 00645a3b to 00645cf1 has its CatchHandler @ 00645d7e */
  pcVar2 = operator_new__(DAT_00fc3988 + 0xc);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder);
  builtin_strncpy(pcVar3,"FadeInThink",0xc);
  iVar4 = DAT_00fc3998;
  iVar1 = DAT_00fc3998 + 1;
  if ((DAT_00fc3990 < iVar1) && (-1 < DAT_00fc3994)) {
    if (DAT_00fc3994 == 0) {
      if (DAT_00fc3990 == 0) {
        if (iVar1 < 9) {
          DAT_00fc3990 = 8;
          goto LAB_00645c2f;
        }
        DAT_00fc3990 = 8;
      }
      do {
        DAT_00fc3990 = DAT_00fc3990 * 2;
      } while (DAT_00fc3990 < iVar1);
    }
    else {
      for (DAT_00fc3990 = (DAT_00fc3998 / DAT_00fc3994 + 1) * DAT_00fc3994; DAT_00fc3990 < iVar1;
          DAT_00fc3990 = (DAT_00fc3990 + iVar1) / 2) {
      }
    }
LAB_00645c2f:
    if (DAT_00fc398c == (void *)0x0) {
      DAT_00fc398c = malloc(DAT_00fc3990 << 2);
    }
    else {
      DAT_00fc398c = realloc(DAT_00fc398c,DAT_00fc3990 << 2);
      iVar1 = DAT_00fc3998 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc3998 = iVar1;
  _DAT_00fc399c = DAT_00fc398c;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc398c + iVar5 + 4),(void *)((int)DAT_00fc398c + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc398c) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc398c) = pcVar2;
  }
  DataMapInit<CColorCorrection>(CColorCorrection*)::dataDesc._68_4_ = pcVar2;
  pcVar2 = operator_new__(DAT_00fc3988 + 0xd);
  pcVar3 = stpcpy(pcVar2,DataMapInit<CColorCorrection>(CColorCorrection*)::nameHolder);
  builtin_strncpy(pcVar3,"FadeOutThink",0xd);
  iVar4 = DAT_00fc3998;
  iVar1 = DAT_00fc3998 + 1;
  if ((DAT_00fc3990 < iVar1) && (-1 < DAT_00fc3994)) {
    if (DAT_00fc3994 == 0) {
      if (DAT_00fc3990 == 0) {
        if (iVar1 < 9) {
          DAT_00fc3990 = 8;
          goto LAB_00645c9f;
        }
        DAT_00fc3990 = 8;
      }
      do {
        DAT_00fc3990 = DAT_00fc3990 * 2;
      } while (DAT_00fc3990 < iVar1);
    }
    else {
      for (DAT_00fc3990 = (DAT_00fc3998 / DAT_00fc3994 + 1) * DAT_00fc3994; DAT_00fc3990 < iVar1;
          DAT_00fc3990 = (DAT_00fc3990 + iVar1) / 2) {
      }
    }
LAB_00645c9f:
    if (DAT_00fc398c == (void *)0x0) {
      DAT_00fc398c = malloc(DAT_00fc3990 << 2);
    }
    else {
      DAT_00fc398c = realloc(DAT_00fc398c,DAT_00fc3990 << 2);
      iVar1 = DAT_00fc3998 + 1;
    }
  }
  iVar5 = iVar4 * 4;
  iVar4 = (iVar1 - iVar4) + -1;
  DAT_00fc3998 = iVar1;
  _DAT_00fc399c = DAT_00fc398c;
  if (0 < iVar4) {
    _V_memmove((void *)((int)DAT_00fc398c + iVar5 + 4),(void *)((int)DAT_00fc398c + iVar5),iVar4 * 4
              );
  }
  if ((undefined4 *)(iVar5 + (int)DAT_00fc398c) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)DAT_00fc398c) = pcVar2;
  }
  DataMapInit<CColorCorrection>(CColorCorrection*)::dataDesc._132_4_ = pcVar2;
  __cxa_guard_release(&DataMapInit<CColorCorrection>(CColorCorrection*)::dataDesc);
LAB_006459f9:
  CColorCorrection::m_DataMap._4_4_ = 0x14;
  CColorCorrection::m_DataMap._0_4_ = 0xf2ab00;
  return (datamap_t *)CColorCorrection::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)