DataMapInit<CFuncTrain>
0x00b0bca0 · 862 bytes · __cdecl
_Z11DataMapInitI10CFuncTrainEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CFuncTrain>(CFuncTrain*) */
datamap_t * DataMapInit<CFuncTrain>(CFuncTrain *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder), iVar1 != 0)) {
DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder = "CFuncTrain";
DAT_0103432c = (void *)0x0;
DAT_01034330 = 0;
DAT_01034334 = 0;
DAT_01034338 = 0;
_DAT_0103433c = (void *)0x0;
DAT_01034328 = 10;
__cxa_guard_release(&DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder,&__dso_handle);
}
CFuncTrain::m_DataMap._12_4_ = CBasePlatTrain::m_DataMap;
if ((DataMapInit<CFuncTrain>(CFuncTrain*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncTrain>(CFuncTrain*)::dataDesc), iVar1 == 0))
goto LAB_00b0bcc9;
/* try { // try from 00b0bd0b to 00b0bfa1 has its CatchHandler @ 00b0c02e */
pcVar2 = operator_new__(DAT_01034328 + 5);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder);
builtin_strncpy(pcVar3,"Wait",5);
iVar4 = DAT_01034338;
iVar1 = DAT_01034338 + 1;
if ((DAT_01034330 < iVar1) && (-1 < DAT_01034334)) {
if (DAT_01034334 == 0) {
if (DAT_01034330 == 0) {
if (iVar1 < 9) {
DAT_01034330 = 8;
goto LAB_00b0bedf;
}
DAT_01034330 = 8;
}
do {
DAT_01034330 = DAT_01034330 * 2;
} while (DAT_01034330 < iVar1);
}
else {
for (DAT_01034330 = (DAT_01034338 / DAT_01034334 + 1) * DAT_01034334; DAT_01034330 < iVar1;
DAT_01034330 = (DAT_01034330 + iVar1) / 2) {
}
}
LAB_00b0bedf:
if (DAT_0103432c == (void *)0x0) {
DAT_0103432c = malloc(DAT_01034330 << 2);
}
else {
DAT_0103432c = realloc(DAT_0103432c,DAT_01034330 << 2);
iVar1 = DAT_01034338 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034338 = iVar1;
_DAT_0103433c = DAT_0103432c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_0103432c + iVar5 + 4),(void *)((int)DAT_0103432c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_0103432c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_0103432c) = pcVar2;
}
DataMapInit<CFuncTrain>(CFuncTrain*)::dataDesc._452_4_ = pcVar2;
pcVar2 = operator_new__(DAT_01034328 + 5);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrain>(CFuncTrain*)::nameHolder);
builtin_strncpy(pcVar3,"Next",5);
iVar4 = DAT_01034338;
iVar1 = DAT_01034338 + 1;
if ((DAT_01034330 < iVar1) && (-1 < DAT_01034334)) {
if (DAT_01034334 == 0) {
if (DAT_01034330 == 0) {
if (iVar1 < 9) {
DAT_01034330 = 8;
goto LAB_00b0bf4f;
}
DAT_01034330 = 8;
}
do {
DAT_01034330 = DAT_01034330 * 2;
} while (DAT_01034330 < iVar1);
}
else {
for (DAT_01034330 = (DAT_01034338 / DAT_01034334 + 1) * DAT_01034334; DAT_01034330 < iVar1;
DAT_01034330 = (DAT_01034330 + iVar1) / 2) {
}
}
LAB_00b0bf4f:
if (DAT_0103432c == (void *)0x0) {
DAT_0103432c = malloc(DAT_01034330 << 2);
}
else {
DAT_0103432c = realloc(DAT_0103432c,DAT_01034330 << 2);
iVar1 = DAT_01034338 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034338 = iVar1;
_DAT_0103433c = DAT_0103432c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_0103432c + iVar5 + 4),(void *)((int)DAT_0103432c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_0103432c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_0103432c) = pcVar2;
}
DataMapInit<CFuncTrain>(CFuncTrain*)::dataDesc._516_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CFuncTrain>(CFuncTrain*)::dataDesc);
LAB_00b0bcc9:
CFuncTrain::m_DataMap._4_4_ = 0xb;
CFuncTrain::m_DataMap._0_4_ = 0xf628c0;
return (datamap_t *)CFuncTrain::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.