DataMapInit<CLogicActiveAutosave>
0x006eb370 · 554 bytes · __cdecl
_Z11DataMapInitI20CLogicActiveAutosaveEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*) */
datamap_t * DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave *param_1)
{
int iVar1;
char *__dest;
char *pcVar2;
int iVar3;
int iVar4;
if ((DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::
nameHolder), iVar1 != 0)) {
DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::nameHolder = "CLogicActiveAutosave";
DAT_00fe49e0 = (void *)0x0;
DAT_00fe49e4 = 0;
DAT_00fe49e8 = 0;
DAT_00fe49ec = 0;
_DAT_00fe49f0 = (void *)0x0;
_DAT_00fe49dc = 0x14;
__cxa_guard_release(&DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::nameHolder,&__dso_handle
);
}
CLogicActiveAutosave::m_DataMap._12_4_ = CLogicAutosave::m_DataMap;
if ((DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::
dataDesc), iVar1 == 0)) goto LAB_006eb399;
/* try { // try from 006eb3db to 006eb509 has its CatchHandler @ 006eb5b9 */
__dest = operator_new__(_DAT_00fe49dc + 10);
pcVar2 = stpcpy(__dest,DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::nameHolder);
builtin_strncpy(pcVar2,"SaveThink",10);
iVar3 = DAT_00fe49ec;
iVar1 = DAT_00fe49ec + 1;
if ((DAT_00fe49e4 < iVar1) && (-1 < DAT_00fe49e8)) {
if (DAT_00fe49e8 == 0) {
if (DAT_00fe49e4 == 0) {
if (iVar1 < 9) {
DAT_00fe49e4 = 8;
goto LAB_006eb54f;
}
DAT_00fe49e4 = 8;
}
do {
DAT_00fe49e4 = DAT_00fe49e4 * 2;
} while (DAT_00fe49e4 < iVar1);
}
else {
for (DAT_00fe49e4 = (DAT_00fe49ec / DAT_00fe49e8 + 1) * DAT_00fe49e8; DAT_00fe49e4 < iVar1;
DAT_00fe49e4 = (DAT_00fe49e4 + iVar1) / 2) {
}
}
LAB_006eb54f:
if (DAT_00fe49e0 == (void *)0x0) {
DAT_00fe49e0 = malloc(DAT_00fe49e4 << 2);
}
else {
DAT_00fe49e0 = realloc(DAT_00fe49e0,DAT_00fe49e4 << 2);
iVar1 = DAT_00fe49ec + 1;
}
}
iVar4 = iVar3 * 4;
iVar3 = (iVar1 - iVar3) + -1;
DAT_00fe49ec = iVar1;
_DAT_00fe49f0 = DAT_00fe49e0;
if (0 < iVar3) {
_V_memmove((void *)((int)DAT_00fe49e0 + iVar4 + 4),(void *)((int)DAT_00fe49e0 + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)DAT_00fe49e0) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)DAT_00fe49e0) = __dest;
}
DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::dataDesc._324_4_ = __dest;
__cxa_guard_release(&DataMapInit<CLogicActiveAutosave>(CLogicActiveAutosave*)::dataDesc);
LAB_006eb399:
CLogicActiveAutosave::m_DataMap._4_4_ = 7;
CLogicActiveAutosave::m_DataMap._0_4_ = 0xf3e280;
return (datamap_t *)CLogicActiveAutosave::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.