DataMapInit<CFuncTrackTrain>
0x00b0c460 · 1510 bytes · __cdecl
_Z11DataMapInitI15CFuncTrackTrainEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*) */
datamap_t * DataMapInit<CFuncTrackTrain>(CFuncTrackTrain *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder),
iVar1 != 0)) {
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder = "CFuncTrackTrain";
DAT_01034310 = (void *)0x0;
DAT_01034314 = 0;
DAT_01034318 = 0;
DAT_0103431c = 0;
_DAT_01034320 = (void *)0x0;
DAT_0103430c = 0xf;
__cxa_guard_release(&DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder,&__dso_handle);
}
CFuncTrackTrain::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
if ((DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc),
iVar1 == 0)) goto LAB_00b0c489;
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2388_4_ = eventFuncs;
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2452_4_ = eventFuncs;
/* try { // try from 00b0c4da to 00b0c991 has its CatchHandler @ 00b0caa2 */
pcVar2 = operator_new__(DAT_0103430c + 5);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder);
builtin_strncpy(pcVar3,"Next",5);
iVar4 = DAT_0103431c;
iVar1 = DAT_0103431c + 1;
if ((DAT_01034314 < iVar1) && (-1 < DAT_01034318)) {
if (DAT_01034318 == 0) {
if (DAT_01034314 == 0) {
if (iVar1 < 9) {
DAT_01034314 = 8;
goto LAB_00b0c79f;
}
DAT_01034314 = 8;
}
do {
DAT_01034314 = DAT_01034314 * 2;
} while (DAT_01034314 < iVar1);
}
else {
for (DAT_01034314 = (DAT_0103431c / DAT_01034318 + 1) * DAT_01034318; DAT_01034314 < iVar1;
DAT_01034314 = (DAT_01034314 + iVar1) / 2) {
}
}
LAB_00b0c79f:
if (DAT_01034310 == (void *)0x0) {
DAT_01034310 = malloc(DAT_01034314 << 2);
}
else {
DAT_01034310 = realloc(DAT_01034310,DAT_01034314 << 2);
iVar1 = DAT_0103431c + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_0103431c = iVar1;
_DAT_01034320 = DAT_01034310;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034310 + iVar5 + 4),(void *)((int)DAT_01034310 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034310) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034310) = pcVar2;
}
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2500_4_ = pcVar2;
pcVar2 = operator_new__(DAT_0103430c + 5);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder);
builtin_strncpy(pcVar3,"Find",5);
iVar4 = DAT_0103431c;
iVar1 = DAT_0103431c + 1;
if ((DAT_01034314 < iVar1) && (-1 < DAT_01034318)) {
if (DAT_01034318 == 0) {
if (DAT_01034314 == 0) {
if (iVar1 < 9) {
DAT_01034314 = 8;
goto LAB_00b0c80f;
}
DAT_01034314 = 8;
}
do {
DAT_01034314 = DAT_01034314 * 2;
} while (DAT_01034314 < iVar1);
}
else {
for (DAT_01034314 = (DAT_0103431c / DAT_01034318 + 1) * DAT_01034318; DAT_01034314 < iVar1;
DAT_01034314 = (DAT_01034314 + iVar1) / 2) {
}
}
LAB_00b0c80f:
if (DAT_01034310 == (void *)0x0) {
DAT_01034310 = malloc(DAT_01034314 << 2);
}
else {
DAT_01034310 = realloc(DAT_01034310,DAT_01034314 << 2);
iVar1 = DAT_0103431c + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_0103431c = iVar1;
_DAT_01034320 = DAT_01034310;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034310 + iVar5 + 4),(void *)((int)DAT_01034310 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034310) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034310) = pcVar2;
}
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2564_4_ = pcVar2;
pcVar2 = operator_new__(DAT_0103430c + 0xc);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder);
builtin_strncpy(pcVar3,"NearestPath",0xc);
iVar4 = DAT_0103431c;
iVar1 = DAT_0103431c + 1;
if ((DAT_01034314 < iVar1) && (-1 < DAT_01034318)) {
if (DAT_01034318 == 0) {
if (DAT_01034314 == 0) {
if (iVar1 < 9) {
DAT_01034314 = 8;
goto LAB_00b0c93f;
}
DAT_01034314 = 8;
}
do {
DAT_01034314 = DAT_01034314 * 2;
} while (DAT_01034314 < iVar1);
}
else {
for (DAT_01034314 = (DAT_0103431c / DAT_01034318 + 1) * DAT_01034318; DAT_01034314 < iVar1;
DAT_01034314 = (DAT_01034314 + iVar1) / 2) {
}
}
LAB_00b0c93f:
if (DAT_01034310 == (void *)0x0) {
DAT_01034310 = malloc(DAT_01034314 << 2);
}
else {
DAT_01034310 = realloc(DAT_01034310,DAT_01034314 << 2);
iVar1 = DAT_0103431c + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_0103431c = iVar1;
_DAT_01034320 = DAT_01034310;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034310 + iVar5 + 4),(void *)((int)DAT_01034310 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034310) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034310) = pcVar2;
}
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2628_4_ = pcVar2;
pcVar2 = operator_new__(DAT_0103430c + 8);
pcVar3 = stpcpy(pcVar2,DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::nameHolder);
pcVar3[0] = 'D';
pcVar3[1] = 'e';
pcVar3[2] = 'a';
pcVar3[3] = 'd';
*(undefined **)(pcVar3 + 4) = &DAT_00646e45;
iVar4 = DAT_0103431c;
iVar1 = DAT_0103431c + 1;
if ((DAT_01034314 < iVar1) && (-1 < DAT_01034318)) {
if (DAT_01034318 == 0) {
if (DAT_01034314 == 0) {
if (iVar1 < 9) {
DAT_01034314 = 8;
goto LAB_00b0c8a7;
}
DAT_01034314 = 8;
}
do {
DAT_01034314 = DAT_01034314 * 2;
} while (DAT_01034314 < iVar1);
}
else {
for (DAT_01034314 = (DAT_0103431c / DAT_01034318 + 1) * DAT_01034318; DAT_01034314 < iVar1;
DAT_01034314 = (DAT_01034314 + iVar1) / 2) {
}
}
LAB_00b0c8a7:
if (DAT_01034310 == (void *)0x0) {
DAT_01034310 = malloc(DAT_01034314 << 2);
}
else {
DAT_01034310 = realloc(DAT_01034310,DAT_01034314 << 2);
iVar1 = DAT_0103431c + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_0103431c = iVar1;
_DAT_01034320 = DAT_01034310;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_01034310 + iVar5 + 4),(void *)((int)DAT_01034310 + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_01034310) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_01034310) = pcVar2;
}
DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc._2692_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CFuncTrackTrain>(CFuncTrackTrain*)::dataDesc);
LAB_00b0c489:
CFuncTrackTrain::m_DataMap._4_4_ = 0x2a;
CFuncTrackTrain::m_DataMap._0_4_ = 0xf61e00;
return (datamap_t *)CFuncTrackTrain::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.