DataMapInit<CPhysicsProp>
0x007f0260 · 941 bytes · __cdecl
_Z11DataMapInitI12CPhysicsPropEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CPhysicsProp>(CPhysicsProp*) */
datamap_t * DataMapInit<CPhysicsProp>(CPhysicsProp *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if ((DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder), iVar1 != 0
)) {
DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder = "CPhysicsProp";
DAT_00ff332c = (void *)0x0;
DAT_00ff3330 = 0;
DAT_00ff3334 = 0;
DAT_00ff3338 = 0;
_DAT_00ff333c = (void *)0x0;
DAT_00ff3328 = 0xc;
__cxa_guard_release(&DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder,&__dso_handle);
}
CPhysicsProp::m_DataMap._12_4_ = CBreakableProp::m_DataMap;
if ((DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc), iVar1 == 0))
goto LAB_007f0289;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1428_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1492_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1556_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1620_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1684_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1748_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1812_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1876_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._1940_4_ = eventFuncs;
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._2004_4_ = eventFuncs;
/* try { // try from 007f0302 to 007f05b1 has its CatchHandler @ 007f063e */
pcVar2 = operator_new__(DAT_00ff3328 + 0x10);
pcVar3 = stpcpy(pcVar2,DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder);
builtin_strncpy(pcVar3,"ClearFlagsThink",0x10);
iVar4 = DAT_00ff3338;
iVar1 = DAT_00ff3338 + 1;
if ((DAT_00ff3330 < iVar1) && (-1 < DAT_00ff3334)) {
if (DAT_00ff3334 == 0) {
if (DAT_00ff3330 == 0) {
if (iVar1 < 9) {
DAT_00ff3330 = 8;
goto LAB_007f04ef;
}
DAT_00ff3330 = 8;
}
do {
DAT_00ff3330 = DAT_00ff3330 * 2;
} while (DAT_00ff3330 < iVar1);
}
else {
for (DAT_00ff3330 = (DAT_00ff3338 / DAT_00ff3334 + 1) * DAT_00ff3334; DAT_00ff3330 < iVar1;
DAT_00ff3330 = (DAT_00ff3330 + iVar1) / 2) {
}
}
LAB_007f04ef:
if (DAT_00ff332c == (void *)0x0) {
DAT_00ff332c = malloc(DAT_00ff3330 << 2);
}
else {
DAT_00ff332c = realloc(DAT_00ff332c,DAT_00ff3330 << 2);
iVar1 = DAT_00ff3338 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00ff3338 = iVar1;
_DAT_00ff333c = DAT_00ff332c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00ff332c + iVar5 + 4),(void *)((int)DAT_00ff332c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00ff332c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00ff332c) = pcVar2;
}
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._2244_4_ = pcVar2;
pcVar2 = operator_new__(DAT_00ff3328 + 9);
pcVar3 = stpcpy(pcVar2,DataMapInit<CPhysicsProp>(CPhysicsProp*)::nameHolder);
builtin_strncpy(pcVar3,"NavThink",9);
iVar4 = DAT_00ff3338;
iVar1 = DAT_00ff3338 + 1;
if ((DAT_00ff3330 < iVar1) && (-1 < DAT_00ff3334)) {
if (DAT_00ff3334 == 0) {
if (DAT_00ff3330 == 0) {
if (iVar1 < 9) {
DAT_00ff3330 = 8;
goto LAB_007f055f;
}
DAT_00ff3330 = 8;
}
do {
DAT_00ff3330 = DAT_00ff3330 * 2;
} while (DAT_00ff3330 < iVar1);
}
else {
for (DAT_00ff3330 = (DAT_00ff3338 / DAT_00ff3334 + 1) * DAT_00ff3334; DAT_00ff3330 < iVar1;
DAT_00ff3330 = (DAT_00ff3330 + iVar1) / 2) {
}
}
LAB_007f055f:
if (DAT_00ff332c == (void *)0x0) {
DAT_00ff332c = malloc(DAT_00ff3330 << 2);
}
else {
DAT_00ff332c = realloc(DAT_00ff332c,DAT_00ff3330 << 2);
iVar1 = DAT_00ff3338 + 1;
}
}
iVar5 = iVar4 * 4;
iVar4 = (iVar1 - iVar4) + -1;
DAT_00ff3338 = iVar1;
_DAT_00ff333c = DAT_00ff332c;
if (0 < iVar4) {
_V_memmove((void *)((int)DAT_00ff332c + iVar5 + 4),(void *)((int)DAT_00ff332c + iVar5),iVar4 * 4
);
}
if ((undefined4 *)(iVar5 + (int)DAT_00ff332c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar5 + (int)DAT_00ff332c) = pcVar2;
}
DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc._2308_4_ = pcVar2;
__cxa_guard_release(&DataMapInit<CPhysicsProp>(CPhysicsProp*)::dataDesc);
LAB_007f0289:
CPhysicsProp::m_DataMap._4_4_ = 0x24;
CPhysicsProp::m_DataMap._0_4_ = 0xf530a0;
return (datamap_t *)CPhysicsProp::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.