DataMapInit<CPhysicsPropRespawnable>
0x007f6e40 · 552 bytes · __cdecl
_Z11DataMapInitI23CPhysicsPropRespawnableEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*) */
datamap_t * DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable *param_1)
{
int iVar1;
char *__dest;
char *pcVar2;
int iVar3;
int iVar4;
if ((DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::
nameHolder), iVar1 != 0)) {
DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::nameHolder =
"CPhysicsPropRespawnable";
DAT_00ff272c = (void *)0x0;
DAT_00ff2730 = 0;
DAT_00ff2734 = 0;
DAT_00ff2738 = 0;
_DAT_00ff273c = (void *)0x0;
_DAT_00ff2728 = 0x17;
__cxa_guard_release(&DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::nameHolder)
;
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::nameHolder,
&__dso_handle);
}
CPhysicsPropRespawnable::m_DataMap._12_4_ = CPhysicsProp::m_DataMap;
if ((DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::
dataDesc), iVar1 == 0)) goto LAB_007f6e69;
/* try { // try from 007f6eab to 007f6fd9 has its CatchHandler @ 007f7089 */
__dest = operator_new__(_DAT_00ff2728 + 0xc);
pcVar2 = stpcpy(__dest,DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::nameHolder)
;
pcVar2[0] = 'M';
pcVar2[1] = 'a';
pcVar2[2] = 't';
pcVar2[3] = 'e';
pcVar2[4] = 'r';
pcVar2[5] = 'i';
pcVar2[6] = 'a';
pcVar2[7] = 'l';
*(undefined **)(pcVar2 + 8) = &DAT_00657a69;
iVar3 = DAT_00ff2738;
iVar1 = DAT_00ff2738 + 1;
if ((DAT_00ff2730 < iVar1) && (-1 < DAT_00ff2734)) {
if (DAT_00ff2734 == 0) {
if (DAT_00ff2730 == 0) {
if (iVar1 < 9) {
DAT_00ff2730 = 8;
goto LAB_007f701f;
}
DAT_00ff2730 = 8;
}
do {
DAT_00ff2730 = DAT_00ff2730 * 2;
} while (DAT_00ff2730 < iVar1);
}
else {
for (DAT_00ff2730 = (DAT_00ff2738 / DAT_00ff2734 + 1) * DAT_00ff2734; DAT_00ff2730 < iVar1;
DAT_00ff2730 = (DAT_00ff2730 + iVar1) / 2) {
}
}
LAB_007f701f:
if (DAT_00ff272c == (void *)0x0) {
DAT_00ff272c = malloc(DAT_00ff2730 << 2);
}
else {
DAT_00ff272c = realloc(DAT_00ff272c,DAT_00ff2730 << 2);
iVar1 = DAT_00ff2738 + 1;
}
}
iVar4 = iVar3 * 4;
iVar3 = (iVar1 - iVar3) + -1;
DAT_00ff2738 = iVar1;
_DAT_00ff273c = DAT_00ff272c;
if (0 < iVar3) {
_V_memmove((void *)((int)DAT_00ff272c + iVar4 + 4),(void *)((int)DAT_00ff272c + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)DAT_00ff272c) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)DAT_00ff272c) = __dest;
}
DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::dataDesc._68_4_ = __dest;
__cxa_guard_release(&DataMapInit<CPhysicsPropRespawnable>(CPhysicsPropRespawnable*)::dataDesc);
LAB_007f6e69:
CPhysicsPropRespawnable::m_DataMap._4_4_ = 6;
CPhysicsPropRespawnable::m_DataMap._0_4_ = 0xf51d60;
return (datamap_t *)CPhysicsPropRespawnable::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.