DataMapInit<CPointPush>
0x007a1100 · 554 bytes · __cdecl
_Z11DataMapInitI10CPointPushEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CPointPush>(CPointPush*) */
datamap_t * DataMapInit<CPointPush>(CPointPush *param_1)
{
int iVar1;
char *__dest;
char *pcVar2;
int iVar3;
int iVar4;
if ((DataMapInit<CPointPush>(CPointPush*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPointPush>(CPointPush*)::nameHolder), iVar1 != 0)) {
DataMapInit<CPointPush>(CPointPush*)::nameHolder = "CPointPush";
DAT_00fed610 = (void *)0x0;
DAT_00fed614 = 0;
DAT_00fed618 = 0;
DAT_00fed61c = 0;
_DAT_00fed620 = (void *)0x0;
_DAT_00fed60c = 10;
__cxa_guard_release(&DataMapInit<CPointPush>(CPointPush*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CPointPush>(CPointPush*)::nameHolder,&__dso_handle);
}
CPointPush::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
if ((DataMapInit<CPointPush>(CPointPush*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPointPush>(CPointPush*)::dataDesc), iVar1 == 0))
goto LAB_007a1129;
/* try { // try from 007a116b to 007a1299 has its CatchHandler @ 007a1349 */
__dest = operator_new__(_DAT_00fed60c + 10);
pcVar2 = stpcpy(__dest,DataMapInit<CPointPush>(CPointPush*)::nameHolder);
builtin_strncpy(pcVar2,"PushThink",10);
iVar3 = DAT_00fed61c;
iVar1 = DAT_00fed61c + 1;
if ((DAT_00fed614 < iVar1) && (-1 < DAT_00fed618)) {
if (DAT_00fed618 == 0) {
if (DAT_00fed614 == 0) {
if (iVar1 < 9) {
DAT_00fed614 = 8;
goto LAB_007a12df;
}
DAT_00fed614 = 8;
}
do {
DAT_00fed614 = DAT_00fed614 * 2;
} while (DAT_00fed614 < iVar1);
}
else {
for (DAT_00fed614 = (DAT_00fed61c / DAT_00fed618 + 1) * DAT_00fed618; DAT_00fed614 < iVar1;
DAT_00fed614 = (DAT_00fed614 + iVar1) / 2) {
}
}
LAB_007a12df:
if (DAT_00fed610 == (void *)0x0) {
DAT_00fed610 = malloc(DAT_00fed614 << 2);
}
else {
DAT_00fed610 = realloc(DAT_00fed610,DAT_00fed614 << 2);
iVar1 = DAT_00fed61c + 1;
}
}
iVar4 = iVar3 * 4;
iVar3 = (iVar1 - iVar3) + -1;
DAT_00fed61c = iVar1;
_DAT_00fed620 = DAT_00fed610;
if (0 < iVar3) {
_V_memmove((void *)((int)DAT_00fed610 + iVar4 + 4),(void *)((int)DAT_00fed610 + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)DAT_00fed610) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)DAT_00fed610) = __dest;
}
DataMapInit<CPointPush>(CPointPush*)::dataDesc._68_4_ = __dest;
__cxa_guard_release(&DataMapInit<CPointPush>(CPointPush*)::dataDesc);
LAB_007a1129:
CPointPush::m_DataMap._4_4_ = 8;
CPointPush::m_DataMap._0_4_ = 0xf49700;
return (datamap_t *)CPointPush::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.