L L4D2node

InfectedBackOff::Update

0x00a2eda0 · 776 bytes · __thiscall

_ZN15InfectedBackOff6UpdateEP8Infectedf

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* InfectedBackOff::Update(Infected*, float) */

InfectedBackOff * __thiscall
InfectedBackOff::Update(InfectedBackOff *this,Infected *param_1,float param_2)

{
  uint *puVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  code *pcVar5;
  int iVar6;
  char cVar7;
  Infected *pIVar8;
  int iVar9;
  float *pfVar10;
  longdouble lVar11;
  Infected *pIVar12;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  local_3c = 0;
  local_38 = 0;
  if (_towlower == 0) {
    local_2c = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_3c,0,0,0,0,
               "/data/src/game/server/terror/zombiebot/infected/infectedbackoff.h",0x61,
               &Update(Infected*,float)::tm_fmt,"(%s)%s","NextBot","InfectedBackOff::Update");
    local_2c = _towlower;
  }
  iVar6 = _DAT_0105db00;
  local_34 = local_3c;
  local_30 = local_38;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 00a2ef0e to 00a2ef6e has its CatchHandler @ 00a2f0e6 */
    iVar9 = ThreadGetCurrentId();
    if (iVar6 == iVar9) {
      if ((char *)*_DAT_0105d15c != "InfectedBackOff::Update") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd225a7,(char *)0x0,0xca8906);
      }
      puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
      *puVar1 = *puVar1 | 4;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 00a2ee5d to 00a2ee93 has its CatchHandler @ 00a2f0c5 */
  lVar11 = (longdouble)CountdownTimer::Now();
  if ((float)lVar11 < *(float *)(param_1 + 0x3c)) {
    pIVar12 = param_1 + 0x40;
                    /* try { // try from 00a2efce to 00a2f0bf has its CatchHandler @ 00a2f0c5 */
    lVar11 = (longdouble)CountdownTimer::Now();
    if ((float)lVar11 < *(float *)(param_1 + 0x48)) {
      pIVar12 = (Infected *)param_2;
      pIVar8 = (Infected *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
      if (pIVar8 != (Infected *)0x0) {
        fVar2 = *(float *)(param_1 + 0x50);
        pcVar5 = *(code **)(*(int *)pIVar8 + 0xb4);
        fVar3 = *(float *)(param_1 + 0x54);
        fVar4 = *(float *)(param_1 + 0x58);
        pfVar10 = (float *)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0xd4))
                                     ((int)param_2 + 0x1a3c);
        local_28 = fVar2 * 100.0 + *pfVar10;
        local_24 = fVar3 * 100.0 + pfVar10[1];
        local_20 = fVar4 * 100.0 + pfVar10[2];
        (*pcVar5)(pIVar8,&local_28,0x3f800000);
        pIVar12 = pIVar8;
      }
    }
    *(undefined4 *)this = 0;
    *(undefined4 *)(this + 4) = 0;
    *(undefined4 *)(this + 8) = 0;
  }
  else {
    pIVar8 = (Infected *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
    pIVar12 = (Infected *)param_2;
    if (pIVar8 != (Infected *)0x0) {
      (**(code **)(*(int *)pIVar8 + 0xd8))(pIVar8);
      pIVar12 = pIVar8;
    }
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(undefined4 *)(this + 8) = 0;
  }
  iVar6 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    iVar9 = ThreadGetCurrentId(pIVar12);
    if (iVar6 == iVar9) {
      cVar7 = CVProfNode::ExitScope();
      if (cVar7 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_2c != 0) {
    (**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
  }
  return this;
}

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)