L L4D2node

CSurvivorDeathModel::CSurvivorDeathModel

0x009adfb0 · 276 bytes · __thiscall

_ZN19CSurvivorDeathModelC1Ev

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CSurvivorDeathModel::CSurvivorDeathModel() */

void __thiscall CSurvivorDeathModel::CSurvivorDeathModel(CSurvivorDeathModel *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  CBaseFlex::CBaseFlex((CBaseFlex *)this);
  *(undefined ***)this = &PTR__CSurvivorDeathModel_00d1b108;
  iVar2 = DAT_01016aac;
  iVar1 = DAT_01016aac + 1;
  if ((iVar1 <= DAT_01016aa4) || (DAT_01016aa8 < 0)) goto LAB_009adfe1;
  if (DAT_01016aa8 == 0) {
    iVar3 = DAT_01016aa4;
    if (DAT_01016aa4 == 0) {
      if (iVar1 < 9) {
        DAT_01016aa4 = 8;
        goto LAB_009ae03f;
      }
      iVar3 = 8;
    }
    do {
      DAT_01016aa4 = iVar3 * 2;
      if (iVar1 <= DAT_01016aa4) break;
      DAT_01016aa4 = iVar3 * 4;
      iVar3 = DAT_01016aa4;
    } while (DAT_01016aa4 < iVar1);
  }
  else {
    for (DAT_01016aa4 = (DAT_01016aac / DAT_01016aa8 + 1) * DAT_01016aa8; DAT_01016aa4 < iVar1;
        DAT_01016aa4 = (DAT_01016aa4 + iVar1) / 2) {
    }
  }
LAB_009ae03f:
  if (g_DeadSurvivors == (void *)0x0) {
    g_DeadSurvivors = malloc(DAT_01016aa4 << 2);
  }
  else {
    g_DeadSurvivors = realloc(g_DeadSurvivors,DAT_01016aa4 << 2);
    iVar1 = DAT_01016aac + 1;
  }
LAB_009adfe1:
  iVar3 = iVar2 * 4;
  iVar2 = (iVar1 - iVar2) + -1;
  DAT_01016aac = iVar1;
  _DAT_01016ab0 = g_DeadSurvivors;
  if (0 < iVar2) {
                    /* try { // try from 009ae085 to 009ae089 has its CatchHandler @ 009ae0dc */
    _V_memmove((void *)((int)g_DeadSurvivors + iVar3 + 4),(void *)((int)g_DeadSurvivors + iVar3),
               iVar2 * 4);
  }
  if ((undefined4 *)(iVar3 + (int)g_DeadSurvivors) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar3 + (int)g_DeadSurvivors) = this;
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)