Witch::Witch
0x00a48970 · 481 bytes · __thiscall
_ZN5WitchC2Ev
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Witch::Witch() */
void __thiscall Witch::Witch(Witch *this)
{
CBaseEdict *this_00;
int iVar1;
int iVar2;
int iVar3;
int iVar4;
Infected::Infected((Infected *)this);
*(undefined ***)this = &PTR__Witch_00d27508;
*(undefined ***)(this + 0x1a3c) = &PTR__Witch_00d27ae8;
*(undefined4 *)(this + 0x1da8) = 0xffffffff;
*(undefined4 *)(this + 0x1dac) = 0xffffffff;
*(undefined4 *)(this + 0x1db4) = 0;
*(undefined4 *)(this + 0x1db8) = 0;
*(undefined4 *)(this + 0x1dbc) = 0;
*(undefined4 *)(this + 0x1dc0) = 0;
*(undefined4 *)(this + 0x1dc4) = 0;
*(undefined4 *)(this + 0x1d9c) = 0xffffffff;
if (*(float *)(this + 0x1d94) != 0.0) {
if (this[0x6c] == (Witch)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
/* try { // try from 00a48a0a to 00a48aa9 has its CatchHandler @ 00a48b6c */
iVar2 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (Witch)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1d94) = 0;
}
*(undefined4 *)(this + 0x1db0) = 0xbf800000;
iVar1 = DAT_01025eac;
*(undefined4 *)(this + 0x1da0) = 0xbf800000;
iVar3 = DAT_01025ea4;
*(undefined4 *)(this + 0x1da4) = 0;
*(undefined4 *)(this + 0x1dac) = 0xffffffff;
*(undefined4 *)(this + 0x1dc8) = 0;
iVar2 = iVar1 + 1;
if ((iVar2 <= iVar3) || (DAT_01025ea8 < 0)) goto LAB_00a48a68;
if (DAT_01025ea8 == 0) {
if (iVar3 == 0) {
if (iVar2 < 9) {
DAT_01025ea4 = 8;
goto LAB_00a48ae7;
}
iVar3 = 8;
}
do {
DAT_01025ea4 = iVar3 * 2;
if (iVar2 <= DAT_01025ea4) break;
DAT_01025ea4 = iVar3 * 4;
iVar3 = DAT_01025ea4;
} while (DAT_01025ea4 < iVar2);
}
else {
for (DAT_01025ea4 = (iVar1 / DAT_01025ea8 + 1) * DAT_01025ea8; DAT_01025ea4 < iVar2;
DAT_01025ea4 = (DAT_01025ea4 + iVar2) / 2) {
}
}
LAB_00a48ae7:
if (TheWitches == (void *)0x0) {
TheWitches = malloc(DAT_01025ea4 << 2);
}
else {
TheWitches = realloc(TheWitches,DAT_01025ea4 << 2);
iVar2 = DAT_01025eac + 1;
}
LAB_00a48a68:
iVar4 = iVar1 * 4;
iVar3 = (iVar2 - iVar1) + -1;
DAT_01025eac = iVar2;
_DAT_01025eb0 = TheWitches;
if (0 < iVar3) {
_V_memmove((void *)((int)TheWitches + iVar4 + 4),(void *)((int)TheWitches + iVar4),iVar3 * 4);
}
if ((undefined4 *)(iVar4 + (int)TheWitches) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)TheWitches) = this;
}
return;
}
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.