DataMapInit<CFuncPlat>
0x00b0a9c0 · 1536 bytes · __cdecl
_Z11DataMapInitI9CFuncPlatEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CFuncPlat>(CFuncPlat*) */
datamap_t * DataMapInit<CFuncPlat>(CFuncPlat *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder), iVar1 != 0)) {
DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder = "CFuncPlat";
DAT_01034364 = (void *)0x0;
DAT_01034368 = 0;
DAT_0103436c = 0;
DAT_01034370 = 0;
_DAT_01034374 = (void *)0x0;
DAT_01034360 = 9;
__cxa_guard_release(&DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder,&__dso_handle);
}
CFuncPlat::m_DataMap._12_4_ = CBasePlatTrain::m_DataMap;
if ((DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc), iVar1 == 0))
goto LAB_00b0a9e9;
/* try { // try from 00b0aa2b to 00b0af01 has its CatchHandler @ 00b0b012 */
pcVar2 = operator_new__(DAT_01034360 + 8);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder);
builtin_strncpy(pcVar3,"PlatUse",8);
iVar4 = DAT_01034370;
iVar1 = DAT_01034370 + 1;
if ((DAT_01034368 < iVar1) && (-1 < DAT_0103436c)) {
if (DAT_0103436c == 0) {
if (DAT_01034368 == 0) {
if (iVar1 < 9) {
DAT_01034368 = 8;
goto LAB_00b0ad0f;
}
DAT_01034368 = 8;
}
do {
DAT_01034368 = DAT_01034368 * 2;
} while (DAT_01034368 < iVar1);
}
else {
for (DAT_01034368 = (DAT_01034370 / DAT_0103436c + 1) * DAT_0103436c; DAT_01034368 < iVar1;
DAT_01034368 = (DAT_01034368 + iVar1) / 2) {
}
}
LAB_00b0ad0f:
if (DAT_01034364 == (void *)0x0) {
DAT_01034364 = malloc(DAT_01034368 << 2);
}
else {
DAT_01034364 = realloc(DAT_01034364,DAT_01034368 << 2);
iVar1 = DAT_01034370 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034370 = iVar1;
_DAT_01034374 = DAT_01034364;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034364 + iVar5 + 4),(void *)((int)DAT_01034364 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034364) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034364) = pcVar2;
}
DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc._132_4_ = pcVar2;
pcVar2 = operator_new__(DAT_01034360 + 0xb);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder);
builtin_strncpy(pcVar3,"CallGoDown",0xb);
iVar4 = DAT_01034370;
iVar1 = DAT_01034370 + 1;
if ((DAT_01034368 < iVar1) && (-1 < DAT_0103436c)) {
if (DAT_0103436c == 0) {
if (DAT_01034368 == 0) {
if (iVar1 < 9) {
DAT_01034368 = 8;
goto LAB_00b0ad7f;
}
DAT_01034368 = 8;
}
do {
DAT_01034368 = DAT_01034368 * 2;
} while (DAT_01034368 < iVar1);
}
else {
for (DAT_01034368 = (DAT_01034370 / DAT_0103436c + 1) * DAT_0103436c; DAT_01034368 < iVar1;
DAT_01034368 = (DAT_01034368 + iVar1) / 2) {
}
}
LAB_00b0ad7f:
if (DAT_01034364 == (void *)0x0) {
DAT_01034364 = malloc(DAT_01034368 << 2);
}
else {
DAT_01034364 = realloc(DAT_01034364,DAT_01034368 << 2);
iVar1 = DAT_01034370 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034370 = iVar1;
_DAT_01034374 = DAT_01034364;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034364 + iVar5 + 4),(void *)((int)DAT_01034364 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034364) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034364) = pcVar2;
}
DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc._196_4_ = pcVar2;
pcVar2 = operator_new__(DAT_01034360 + 0xb);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder);
builtin_strncpy(pcVar3,"CallHitTop",0xb);
iVar4 = DAT_01034370;
iVar1 = DAT_01034370 + 1;
if ((DAT_01034368 < iVar1) && (-1 < DAT_0103436c)) {
if (DAT_0103436c == 0) {
if (DAT_01034368 == 0) {
if (iVar1 < 9) {
DAT_01034368 = 8;
goto LAB_00b0aeaf;
}
DAT_01034368 = 8;
}
do {
DAT_01034368 = DAT_01034368 * 2;
} while (DAT_01034368 < iVar1);
}
else {
for (DAT_01034368 = (DAT_01034370 / DAT_0103436c + 1) * DAT_0103436c; DAT_01034368 < iVar1;
DAT_01034368 = (DAT_01034368 + iVar1) / 2) {
}
}
LAB_00b0aeaf:
if (DAT_01034364 == (void *)0x0) {
DAT_01034364 = malloc(DAT_01034368 << 2);
}
else {
DAT_01034364 = realloc(DAT_01034364,DAT_01034368 << 2);
iVar1 = DAT_01034370 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034370 = iVar1;
_DAT_01034374 = DAT_01034364;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034364 + iVar5 + 4),(void *)((int)DAT_01034364 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034364) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034364) = pcVar2;
}
DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc._260_4_ = pcVar2;
pcVar2 = operator_new__(DAT_01034360 + 0xe);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncPlat>(CFuncPlat*)::nameHolder);
builtin_strncpy(pcVar3,"CallHitBottom",0xe);
iVar4 = DAT_01034370;
iVar1 = DAT_01034370 + 1;
if ((DAT_01034368 < iVar1) && (-1 < DAT_0103436c)) {
if (DAT_0103436c == 0) {
if (DAT_01034368 == 0) {
if (iVar1 < 9) {
DAT_01034368 = 8;
goto LAB_00b0ae17;
}
DAT_01034368 = 8;
}
do {
DAT_01034368 = DAT_01034368 * 2;
} while (DAT_01034368 < iVar1);
}
else {
for (DAT_01034368 = (DAT_01034370 / DAT_0103436c + 1) * DAT_0103436c; DAT_01034368 < iVar1;
DAT_01034368 = (DAT_01034368 + iVar1) / 2) {
}
}
LAB_00b0ae17:
if (DAT_01034364 == (void *)0x0) {
DAT_01034364 = malloc(DAT_01034368 << 2);
}
else {
DAT_01034364 = realloc(DAT_01034364,DAT_01034368 << 2);
iVar1 = DAT_01034370 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_01034370 = iVar1;
_DAT_01034374 = DAT_01034364;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034364 + iVar5 + 4),(void *)((int)DAT_01034364 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034364) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034364) = pcVar2;
}
DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc._324_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CFuncPlat>(CFuncPlat*)::dataDesc);
LAB_00b0a9e9:
CFuncPlat::m_DataMap._4_4_ = 8;
CFuncPlat::m_DataMap._0_4_ = 0xf62c80;
return (datamap_t *)CFuncPlat::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.