L L4D2node

CFuncLadder::CFuncLadder

0x004505f0 · 405 bytes · __thiscall

_ZN11CFuncLadderC1Ev

Decompiled

undefined (1 param)

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

void __thiscall CFuncLadder::CFuncLadder(CFuncLadder *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  CBaseEntity::CBaseEntity((CBaseEntity *)this,false);
  *(undefined ***)this = &PTR__CFuncLadder_00c12d68;
  iVar1 = DAT_00f7a1e0;
  *(undefined4 *)(this + 0x44c) = 0;
  iVar3 = _DAT_00f7a1d8;
  *(undefined4 *)(this + 0x450) = 0;
  *(undefined4 *)(this + 0x454) = 0;
  *(undefined4 *)(this + 0x458) = 0;
  iVar2 = iVar1 + 1;
  this[0x478] = (CFuncLadder)0x0;
  *(undefined4 *)(this + 0x45c) = 0;
  *(undefined4 *)(this + 0x480) = 0;
  *(undefined4 *)(this + 0x48c) = 0xffffffff;
  *(undefined4 *)(this + 0x490) = 0;
  *(undefined4 *)(this + 0x498) = 0;
  *(undefined4 *)(this + 0x4a4) = 0xffffffff;
  *(undefined4 *)(this + 0x4a8) = 0;
  if ((iVar2 <= iVar3) || (DAT_00f7a1dc < 0)) goto LAB_004506a2;
  if (DAT_00f7a1dc == 0) {
    if (iVar3 == 0) {
      if (iVar2 < 9) {
        _DAT_00f7a1d8 = 8;
        goto LAB_004506ff;
      }
      iVar3 = 8;
    }
    do {
      _DAT_00f7a1d8 = iVar3 * 2;
      if (iVar2 <= _DAT_00f7a1d8) break;
      _DAT_00f7a1d8 = iVar3 * 4;
      iVar3 = _DAT_00f7a1d8;
    } while (_DAT_00f7a1d8 < iVar2);
  }
  else {
    for (_DAT_00f7a1d8 = (iVar1 / DAT_00f7a1dc + 1) * DAT_00f7a1dc; _DAT_00f7a1d8 < iVar2;
        _DAT_00f7a1d8 = (_DAT_00f7a1d8 + iVar2) / 2) {
    }
  }
LAB_004506ff:
  if (s_Ladders == (void *)0x0) {
    s_Ladders = malloc(_DAT_00f7a1d8 << 2);
  }
  else {
    s_Ladders = realloc(s_Ladders,_DAT_00f7a1d8 << 2);
    iVar2 = DAT_00f7a1e0 + 1;
  }
LAB_004506a2:
  iVar4 = iVar1 * 4;
  iVar3 = (iVar2 - iVar1) + -1;
  DAT_00f7a1e0 = iVar2;
  _DAT_00f7a1e4 = s_Ladders;
  if (0 < iVar3) {
                    /* try { // try from 00450745 to 00450749 has its CatchHandler @ 0045079c */
    _V_memmove((void *)((int)s_Ladders + iVar4 + 4),(void *)((int)s_Ladders + iVar4),iVar3 * 4);
  }
  if ((undefined4 *)(iVar4 + (int)s_Ladders) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar4 + (int)s_Ladders) = 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)