DataMapInit<CGib>
0x006d4c80 · 1549 bytes · __cdecl
_Z11DataMapInitI4CGibEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CGib>(CGib*) */
datamap_t * DataMapInit<CGib>(CGib *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CGib>(CGib*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CGib>(CGib*)::nameHolder), iVar1 != 0)) {
DataMapInit<CGib>(CGib*)::nameHolder = "CGib";
DAT_00fe364c = (void *)0x0;
DAT_00fe3650 = 0;
DAT_00fe3654 = 0;
DAT_00fe3658 = 0;
_DAT_00fe365c = (void *)0x0;
DAT_00fe3648 = 4;
__cxa_guard_release(&DataMapInit<CGib>(CGib*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CGib>(CGib*)::nameHolder,&__dso_handle);
}
CGib::m_DataMap._12_4_ = CBaseAnimating::m_DataMap;
if ((DataMapInit<CGib>(CGib*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CGib>(CGib*)::dataDesc), iVar1 == 0))
goto LAB_006d4ca9;
/* try { // try from 006d4ceb to 006d51d1 has its CatchHandler @ 006d52e2 */
pcVar2 = operator_new__(DAT_00fe3648 + 0xf);
pcVar3 = stpcpy(pcVar2,DataMapInit<CGib>(CGib*)::nameHolder);
builtin_strncpy(pcVar3,"BounceGibTouch",0xf);
iVar4 = DAT_00fe3658;
iVar1 = DAT_00fe3658 + 1;
if ((DAT_00fe3650 < iVar1) && (-1 < DAT_00fe3654)) {
if (DAT_00fe3654 == 0) {
if (DAT_00fe3650 == 0) {
if (iVar1 < 9) {
DAT_00fe3650 = 8;
goto LAB_006d4fdf;
}
DAT_00fe3650 = 8;
}
do {
DAT_00fe3650 = DAT_00fe3650 * 2;
} while (DAT_00fe3650 < iVar1);
}
else {
for (DAT_00fe3650 = (DAT_00fe3658 / DAT_00fe3654 + 1) * DAT_00fe3654; DAT_00fe3650 < iVar1;
DAT_00fe3650 = (DAT_00fe3650 + iVar1) / 2) {
}
}
LAB_006d4fdf:
if (DAT_00fe364c == (void *)0x0) {
DAT_00fe364c = malloc(DAT_00fe3650 << 2);
}
else {
DAT_00fe364c = realloc(DAT_00fe364c,DAT_00fe3650 << 2);
iVar1 = DAT_00fe3658 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe3658 = iVar1;
_DAT_00fe365c = DAT_00fe364c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe364c + iVar5 + 4),(void *)((int)DAT_00fe364c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe364c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe364c) = pcVar2;
}
DataMapInit<CGib>(CGib*)::dataDesc._68_4_ = pcVar2;
pcVar2 = operator_new__(DAT_00fe3648 + 0xf);
pcVar3 = stpcpy(pcVar2,DataMapInit<CGib>(CGib*)::nameHolder);
builtin_strncpy(pcVar3,"StickyGibTouch",0xf);
iVar4 = DAT_00fe3658;
iVar1 = DAT_00fe3658 + 1;
if ((DAT_00fe3650 < iVar1) && (-1 < DAT_00fe3654)) {
if (DAT_00fe3654 == 0) {
if (DAT_00fe3650 == 0) {
if (iVar1 < 9) {
DAT_00fe3650 = 8;
goto LAB_006d504f;
}
DAT_00fe3650 = 8;
}
do {
DAT_00fe3650 = DAT_00fe3650 * 2;
} while (DAT_00fe3650 < iVar1);
}
else {
for (DAT_00fe3650 = (DAT_00fe3658 / DAT_00fe3654 + 1) * DAT_00fe3654; DAT_00fe3650 < iVar1;
DAT_00fe3650 = (DAT_00fe3650 + iVar1) / 2) {
}
}
LAB_006d504f:
if (DAT_00fe364c == (void *)0x0) {
DAT_00fe364c = malloc(DAT_00fe3650 << 2);
}
else {
DAT_00fe364c = realloc(DAT_00fe364c,DAT_00fe3650 << 2);
iVar1 = DAT_00fe3658 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe3658 = iVar1;
_DAT_00fe365c = DAT_00fe364c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe364c + iVar5 + 4),(void *)((int)DAT_00fe364c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe364c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe364c) = pcVar2;
}
DataMapInit<CGib>(CGib*)::dataDesc._132_4_ = pcVar2;
pcVar2 = operator_new__(DAT_00fe3648 + 0xd);
pcVar3 = stpcpy(pcVar2,DataMapInit<CGib>(CGib*)::nameHolder);
builtin_strncpy(pcVar3,"WaitTillLand",0xd);
iVar4 = DAT_00fe3658;
iVar1 = DAT_00fe3658 + 1;
if ((DAT_00fe3650 < iVar1) && (-1 < DAT_00fe3654)) {
if (DAT_00fe3654 == 0) {
if (DAT_00fe3650 == 0) {
if (iVar1 < 9) {
DAT_00fe3650 = 8;
goto LAB_006d517f;
}
DAT_00fe3650 = 8;
}
do {
DAT_00fe3650 = DAT_00fe3650 * 2;
} while (DAT_00fe3650 < iVar1);
}
else {
for (DAT_00fe3650 = (DAT_00fe3658 / DAT_00fe3654 + 1) * DAT_00fe3654; DAT_00fe3650 < iVar1;
DAT_00fe3650 = (DAT_00fe3650 + iVar1) / 2) {
}
}
LAB_006d517f:
if (DAT_00fe364c == (void *)0x0) {
DAT_00fe364c = malloc(DAT_00fe3650 << 2);
}
else {
DAT_00fe364c = realloc(DAT_00fe364c,DAT_00fe3650 << 2);
iVar1 = DAT_00fe3658 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe3658 = iVar1;
_DAT_00fe365c = DAT_00fe364c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe364c + iVar5 + 4),(void *)((int)DAT_00fe364c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe364c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe364c) = pcVar2;
}
DataMapInit<CGib>(CGib*)::dataDesc._196_4_ = pcVar2;
pcVar2 = operator_new__(DAT_00fe3648 + 9);
pcVar3 = stpcpy(pcVar2,DataMapInit<CGib>(CGib*)::nameHolder);
builtin_strncpy(pcVar3,"DieThink",9);
iVar4 = DAT_00fe3658;
iVar1 = DAT_00fe3658 + 1;
if ((DAT_00fe3650 < iVar1) && (-1 < DAT_00fe3654)) {
if (DAT_00fe3654 == 0) {
if (DAT_00fe3650 == 0) {
if (iVar1 < 9) {
DAT_00fe3650 = 8;
goto LAB_006d50e7;
}
DAT_00fe3650 = 8;
}
do {
DAT_00fe3650 = DAT_00fe3650 * 2;
} while (DAT_00fe3650 < iVar1);
}
else {
for (DAT_00fe3650 = (DAT_00fe3658 / DAT_00fe3654 + 1) * DAT_00fe3654; DAT_00fe3650 < iVar1;
DAT_00fe3650 = (DAT_00fe3650 + iVar1) / 2) {
}
}
LAB_006d50e7:
if (DAT_00fe364c == (void *)0x0) {
DAT_00fe364c = malloc(DAT_00fe3650 << 2);
}
else {
DAT_00fe364c = realloc(DAT_00fe364c,DAT_00fe3650 << 2);
iVar1 = DAT_00fe3658 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00fe3658 = iVar1;
_DAT_00fe365c = DAT_00fe364c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00fe364c + iVar5 + 4),(void *)((int)DAT_00fe364c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00fe364c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00fe364c) = pcVar2;
}
DataMapInit<CGib>(CGib*)::dataDesc._260_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CGib>(CGib*)::dataDesc);
LAB_006d4ca9:
CGib::m_DataMap._4_4_ = 4;
CGib::m_DataMap._0_4_ = 0xf3c260;
return (datamap_t *)CGib::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.