L L4D2node

CZombieBorder::CZombieBorder

0x007182a0 · 284 bytes · __thiscall

_ZN13CZombieBorderC2Ev

Decompiled

undefined (1 param)

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

void __thiscall CZombieBorder::CZombieBorder(CZombieBorder *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  CBaseEntity::CBaseEntity((CBaseEntity *)this,true);
  *(undefined ***)this = &PTR__CZombieBorder_00ca3aa8;
  iVar2 = DAT_00fe670c;
  iVar1 = DAT_00fe670c + 1;
  if ((iVar1 <= _DAT_00fe6704) || (DAT_00fe6708 < 0)) goto LAB_007182d9;
  if (DAT_00fe6708 == 0) {
    iVar3 = _DAT_00fe6704;
    if (_DAT_00fe6704 == 0) {
      if (iVar1 < 9) {
        _DAT_00fe6704 = 8;
        goto LAB_0071832f;
      }
      iVar3 = 8;
    }
    do {
      _DAT_00fe6704 = iVar3 * 2;
      if (iVar1 <= _DAT_00fe6704) break;
      _DAT_00fe6704 = iVar3 * 4;
      iVar3 = _DAT_00fe6704;
    } while (_DAT_00fe6704 < iVar1);
  }
  else {
    for (_DAT_00fe6704 = (DAT_00fe670c / DAT_00fe6708 + 1) * DAT_00fe6708; _DAT_00fe6704 < iVar1;
        _DAT_00fe6704 = (_DAT_00fe6704 + iVar1) / 2) {
    }
  }
LAB_0071832f:
  if (g_zombieBorders == (void *)0x0) {
    g_zombieBorders = malloc(_DAT_00fe6704 << 2);
  }
  else {
    g_zombieBorders = realloc(g_zombieBorders,_DAT_00fe6704 << 2);
    iVar1 = DAT_00fe670c + 1;
  }
LAB_007182d9:
  iVar3 = iVar2 * 4;
  iVar2 = (iVar1 - iVar2) + -1;
  DAT_00fe670c = iVar1;
  _DAT_00fe6710 = g_zombieBorders;
  if (0 < iVar2) {
                    /* try { // try from 00718375 to 00718379 has its CatchHandler @ 007183cc */
    _V_memmove((void *)((int)g_zombieBorders + iVar3 + 4),(void *)((int)g_zombieBorders + iVar3),
               iVar2 * 4);
  }
  if ((undefined4 *)(iVar3 + (int)g_zombieBorders) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar3 + (int)g_zombieBorders) = 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)