DataMapInit<CEnvWind>
0x006720f0 · 569 bytes · __cdecl
_Z11DataMapInitI8CEnvWindEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CEnvWind>(CEnvWind*) */
datamap_t * DataMapInit<CEnvWind>(CEnvWind *param_1)
{
int iVar1;
char *__dest;
char *pcVar2;
int iVar3;
int iVar4;
if ((DataMapInit<CEnvWind>(CEnvWind*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CEnvWind>(CEnvWind*)::nameHolder), iVar1 != 0)) {
DataMapInit<CEnvWind>(CEnvWind*)::nameHolder = "CEnvWind";
DAT_00fc8294 = (void *)0x0;
DAT_00fc8298 = 0;
DAT_00fc829c = 0;
DAT_00fc82a0 = 0;
_DAT_00fc82a4 = (void *)0x0;
_DAT_00fc8290 = 8;
__cxa_guard_release(&DataMapInit<CEnvWind>(CEnvWind*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CEnvWind>(CEnvWind*)::nameHolder,&__dso_handle);
}
CEnvWind::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
if ((DataMapInit<CEnvWind>(CEnvWind*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CEnvWind>(CEnvWind*)::dataDesc), iVar1 == 0))
goto LAB_00672119;
DataMapInit<CEnvWind>(CEnvWind*)::dataDesc._788_4_ = eventFuncs;
DataMapInit<CEnvWind>(CEnvWind*)::dataDesc._852_4_ = eventFuncs;
/* try { // try from 0067216a to 00672299 has its CatchHandler @ 00672349 */
__dest = operator_new__(_DAT_00fc8290 + 10);
pcVar2 = stpcpy(__dest,DataMapInit<CEnvWind>(CEnvWind*)::nameHolder);
builtin_strncpy(pcVar2,"WindThink",10);
iVar3 = DAT_00fc82a0;
iVar1 = DAT_00fc82a0 + 1;
if ((DAT_00fc8298 < iVar1) && (-1 < DAT_00fc829c)) {
if (DAT_00fc829c == 0) {
if (DAT_00fc8298 == 0) {
if (iVar1 < 9) {
DAT_00fc8298 = 8;
goto LAB_006722df;
}
DAT_00fc8298 = 8;
}
do {
DAT_00fc8298 = DAT_00fc8298 * 2;
} while (DAT_00fc8298 < iVar1);
}
else {
for (DAT_00fc8298 = (DAT_00fc82a0 / DAT_00fc829c + 1) * DAT_00fc829c; DAT_00fc8298 < iVar1;
DAT_00fc8298 = (DAT_00fc8298 + iVar1) / 2) {
}
}
LAB_006722df:
if (DAT_00fc8294 == (void *)0x0) {
DAT_00fc8294 = malloc(DAT_00fc8298 << 2);
}
else {
DAT_00fc8294 = realloc(DAT_00fc8294,DAT_00fc8298 << 2);
iVar1 = DAT_00fc82a0 + 1;
}
}
iVar4 = iVar3 * 4;
iVar3 = (iVar1 - iVar3) + -1;
DAT_00fc82a0 = iVar1;
_DAT_00fc82a4 = DAT_00fc8294;
if (0 < iVar3) {
_V_memmove((void *)((int)DAT_00fc8294 + iVar4 + 4),(void *)((int)DAT_00fc8294 + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)DAT_00fc8294) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)DAT_00fc8294) = __dest;
}
DataMapInit<CEnvWind>(CEnvWind*)::dataDesc._900_4_ = __dest;
__cxa_guard_release(&DataMapInit<CEnvWind>(CEnvWind*)::dataDesc);
LAB_00672119:
CEnvWind::m_DataMap._4_4_ = 0xe;
CEnvWind::m_DataMap._0_4_ = 0xf2e700;
return (datamap_t *)CEnvWind::m_DataMap;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.