L L4D2node

ChaseVictim::Update

0x00a2afd0 · 6462 bytes · __thiscall

_ZN11ChaseVictim6UpdateEP8Infectedf

Decompiled

undefined (3 params)

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

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

{
  Infected *pIVar1;
  float fVar2;
  uint *puVar3;
  uint uVar4;
  code *pcVar5;
  code *pcVar6;
  char cVar7;
  Infected IVar8;
  int *piVar9;
  int *piVar10;
  int *piVar11;
  CBaseEntity *this_00;
  int iVar12;
  undefined4 *puVar13;
  int iVar14;
  int *piVar15;
  CBaseEntity *pCVar16;
  undefined4 uVar17;
  undefined4 *puVar18;
  undefined *puVar19;
  float *pfVar20;
  float *pfVar21;
  longdouble lVar22;
  longdouble lVar23;
  float afStackY_118 [2];
  float *local_b4;
  int local_84;
  int local_80;
  int local_7c;
  float local_78;
  int local_70;
  int local_6c;
  int local_68;
  float local_5c;
  float local_58;
  float local_54;
  float local_50;
  float local_4c;
  float local_48;
  float local_44;
  int local_40;
  float local_3c;
  int local_38;
  undefined **local_34;
  float local_30;
  int *local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  pfVar20 = (float *)&stack0xfffffef4;
  local_84 = 0;
  local_80 = 0;
  if (_towlower == 0) {
    local_68 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))();
    local_68 = _towlower;
  }
  iVar12 = _DAT_0105db00;
  local_70 = local_84;
  local_6c = local_80;
                    /* try { // try from 00a2b236 to 00a2b296 has its CatchHandler @ 00a2c9ae */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar14 = ThreadGetCurrentId(), iVar12 == iVar14)) {
    if ((char *)*_DAT_0105d15c != "InfectedAttack::ChaseVictim::Update") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd22844,(char *)0x0,0xca8906);
    }
    puVar3 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
    *puVar3 = *puVar3 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 00a2b08b to 00a2b141 has its CatchHandler @ 00a2c98d */
  piVar9 = (int *)(**(code **)(*(int *)param_2 + 0x590))();
  piVar10 = (int *)(**(code **)(*(int *)param_2 + 0x594))();
  piVar11 = (int *)(**(code **)(*(int *)param_2 + 0x59c))();
  uVar4 = *(uint *)(*(int *)(param_1 + 0x34) + 0x34);
  if (((uVar4 == 0xffffffff) ||
      (puVar19 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar19 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar19 + 8) != uVar4 >> 0xc)) {
    pCVar16 = (CBaseEntity *)0x0;
LAB_00a2b0ef:
    this_00 = (CBaseEntity *)
              CDirectorTacticalServices::GetClosestCharacterWhoIsIT
                        (*(CDirectorTacticalServices **)(TheDirector + 0x628),
                         (CBaseCombatCharacter *)param_2);
    if ((this_00 == (CBaseEntity *)0x0) && (this_00 = pCVar16, pCVar16 == (CBaseEntity *)0x0)) {
      puVar13 = ::operator_new(0x40);
      puVar13[8] = 0;
      puVar13[9] = 0;
      puVar13[10] = 0;
      puVar13[3] = 0;
      puVar13[4] = 0;
      puVar13[5] = 0;
      puVar13[6] = 0;
      puVar13[7] = 0;
      puVar13[2] = 0;
      *(undefined1 *)(puVar13 + 0xc) = 0;
      *(undefined1 *)((int)puVar13 + 0x31) = 0;
      puVar13[0xb] = 0;
      *puVar13 = &PTR__LostVictim_00d22f08;
      puVar13[1] = &PTR__LostVictim_00d2306c;
      puVar13[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
      puVar13[0xe] = 0;
      puVar13[0xf] = 0xbf800000;
      *(undefined4 *)this = 1;
      *(undefined4 **)(this + 4) = puVar13;
      *(char **)(this + 8) = "Victim pointer is NULL";
      goto LAB_00a2b1c5;
    }
  }
  else {
    this_00 = *(CBaseEntity **)(puVar19 + 4);
    pCVar16 = this_00;
    if ((this_00 == (CBaseEntity *)0x0) ||
       ((*(char **)(this_00 + 0x7c) != "pipe_bomb*" &&
        (cVar7 = CBaseEntity::ClassMatchesComplex(this_00,"pipe_bomb*"), cVar7 == '\0'))))
    goto LAB_00a2b0ef;
  }
  iVar12 = (**(code **)(*(int *)this_00 + 0x144))();
  if ((iVar12 != 0) && (cVar7 = (**(code **)(*(int *)this_00 + 300))(), cVar7 == '\0')) {
    puVar13 = ::operator_new(0x40);
    puVar13[8] = 0;
    puVar13[9] = 0;
    puVar13[10] = 0;
    puVar13[3] = 0;
    puVar13[4] = 0;
    puVar13[5] = 0;
    puVar13[6] = 0;
    puVar13[7] = 0;
    puVar13[2] = 0;
    *(undefined1 *)(puVar13 + 0xc) = 0;
    *(undefined1 *)((int)puVar13 + 0x31) = 0;
    puVar13[0xb] = 0;
    *puVar13 = &PTR__LostVictim_00d22f08;
    puVar13[1] = &PTR__LostVictim_00d2306c;
    puVar13[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar13[0xe] = 0;
    puVar13[0xf] = 0xbf800000;
    *(undefined4 *)this = 1;
    *(undefined4 **)(this + 4) = puVar13;
    *(char **)(this + 8) = "Victim died";
    pfVar20 = (float *)&stack0xfffffef4;
    goto LAB_00a2b1c5;
  }
                    /* try { // try from 00a2b2b0 to 00a2b498 has its CatchHandler @ 00a2c98d */
  cVar7 = CDirector::IsBackgroundMap();
  if ((((cVar7 == '\0') && (*(int *)(ZombieNoCull._28_4_ + 0x30) == 0)) &&
      (cVar7 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x104))(), cVar7 != '\0')) &&
     (lVar22 = (longdouble)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x108))(),
     3.0 < (float)lVar22)) {
    iVar12 = (**(code **)(*(int *)param_2 + 0x52c))();
    if ((iVar12 == 0) || (*(char *)(iVar12 + 0x7d) == '\0')) {
      cVar7 = CDirectorTacticalServices::IsVisibleToTeam
                        (*(CDirectorTacticalServices **)(TheDirector + 0x628),(CBaseEntity *)param_2
                         ,2,0,0.0,(TerrorNavArea *)0x0);
      if (cVar7 != '\0') {
        if (*(int *)(z_debug_stuck._28_4_ + 0x30) != 0) {
          if (((byte)this_00[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition(this_00);
          }
          local_4c = *(float *)(this_00 + 0x2e0);
          local_48 = *(float *)(this_00 + 0x2e4);
          local_44 = *(float *)(this_00 + 0x2e8);
                    /* try { // try from 00a2c8e8 to 00a2c949 has its CatchHandler @ 00a2c9c1 */
          if ((((*(byte *)((int)param_2 + 0x14d) & 8) != 0) &&
              (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2),
              (*(byte *)((int)param_2 + 0x14d) & 8) != 0)) &&
             (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2),
             (*(byte *)((int)param_2 + 0x14d) & 8) != 0)) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
          }
                    /* try { // try from 00a2c6a4 to 00a2c815 has its CatchHandler @ 00a2c9c1 */
          Warning();
          local_34 = (undefined **)0x0;
          local_30 = -1.0;
          local_2c = (int *)0x0;
          local_40 = 0x3f800000;
          local_3c = 0.0;
          local_38 = 0;
          if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
          }
          NDebugOverlay::Circle
                    ((Vector *)((int)param_2 + 0x2e0),(Vector *)&local_40,(Vector *)&local_34,5.0,
                     0xff,0,0xff,0xff,true,60.0);
          local_34 = (undefined **)0x0;
          local_30 = -1.0;
          local_2c = (int *)0x0;
          local_40 = 0x3f800000;
          local_3c = 0.0;
          local_38 = 0;
          NDebugOverlay::Circle
                    ((Vector *)&local_4c,(Vector *)&local_40,(Vector *)&local_34,5.0,0xff,0xff,0,
                     0xff,true,60.0);
          if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
          }
          NDebugOverlay::Line((Vector *)((int)param_2 + 0x2e0),(Vector *)&local_4c,0xff,0xff,0xff,
                              true,60.0);
        }
        goto LAB_00a2b2c9;
      }
      if ((*(int *)(ZombieDebugCull._28_4_ + 0x30) != 0) ||
         (*(int *)(z_debug_stuck._28_4_ + 0x30) != 0)) {
        if (((byte)this_00[0x14d] & 8) != 0) {
                    /* try { // try from 00a2c952 to 00a2c974 has its CatchHandler @ 00a2c98d */
          CBaseEntity::CalcAbsolutePosition(this_00);
        }
        local_4c = *(float *)(this_00 + 0x2e0);
        local_48 = *(float *)(this_00 + 0x2e4);
        local_44 = *(float *)(this_00 + 0x2e8);
        if ((((*(byte *)((int)param_2 + 0x14d) & 8) != 0) &&
            (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2),
            (*(byte *)((int)param_2 + 0x14d) & 8) != 0)) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2),
           (*(byte *)((int)param_2 + 0x14d) & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
        }
        Warning();
        local_34 = (undefined **)0x0;
        local_30 = -1.0;
        local_2c = (int *)0x0;
        local_40 = 0x3f800000;
        local_3c = 0.0;
        local_38 = 0;
        if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
        }
        NDebugOverlay::Circle
                  ((Vector *)((int)param_2 + 0x2e0),(Vector *)&local_40,(Vector *)&local_34,5.0,0xff
                   ,0,0,0xff,true,60.0);
        local_34 = (undefined **)0x0;
        local_30 = -1.0;
        local_2c = (int *)0x0;
        local_40 = 0x3f800000;
        local_3c = 0.0;
        local_38 = 0;
        NDebugOverlay::Circle
                  ((Vector *)&local_4c,(Vector *)&local_40,(Vector *)&local_34,5.0,0xff,0xff,0,0xff,
                   true,60.0);
        if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
        }
        NDebugOverlay::Line((Vector *)((int)param_2 + 0x2e0),(Vector *)&local_4c,0xff,0xff,0xff,true
                            ,60.0);
      }
      cVar7 = (**(code **)(*(int *)this_00 + 0x16c))();
      if ((cVar7 != '\0') && (cVar7 = (**(code **)(*(int *)this_00 + 0x550))(), cVar7 != '\0')) {
        *(int *)(TheZombieManager + 0x210) = *(int *)(TheZombieManager + 0x210) + 1;
        UTIL_LogPrintf("%3.2f: ZombieManager::SetPendingMobCount: Pending mob set to %d.\n");
      }
      iVar12 = CBaseEntity::GetGender((CBaseEntity *)param_2);
      if (iVar12 == 0x11) {
        *(undefined1 *)(TheZombieManager + 0x18) = 0;
      }
      UTIL_Remove((CBaseEntity *)param_2);
    }
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(undefined4 *)(this + 8) = 0;
    pfVar20 = (float *)&stack0xfffffef4;
    goto LAB_00a2b1c5;
  }
LAB_00a2b2c9:
  (**(code **)(*piVar10 + 0xc4))();
  cVar7 = (**(code **)(*piVar9 + 0xf8))();
  pfVar20 = (float *)&stack0xfffffef4;
                    /* try { // try from 00a2b8fb to 00a2c3c9 has its CatchHandler @ 00a2c98d */
  if ((cVar7 != '\0') &&
     (cVar7 = (**(code **)(*piVar9 + 0x114))(), pfVar20 = (float *)&stack0xfffffef4, cVar7 == '\0'))
  {
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    fVar2 = *(float *)(this_00 + 0x2e8);
    (**(code **)(*(int *)param_2 + 0x234))();
    pfVar20 = (float *)&stack0xfffffef0;
    if (fVar2 <= local_5c) {
      if (((byte)this_00[0x14d] & 0x10) != 0) {
                    /* try { // try from 00a2c4bb to 00a2c4bf has its CatchHandler @ 00a2c98d */
        CBaseEntity::CalcAbsoluteVelocity(this_00);
      }
      if ((*(float *)(this_00 + 0x274) * *(float *)(this_00 + 0x274) +
           *(float *)(this_00 + 0x278) * *(float *)(this_00 + 0x278) +
           *(float *)(this_00 + 0x27c) * *(float *)(this_00 + 0x27c) < 2500.0) &&
         (cVar7 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x114))(), cVar7 != '\0')) {
        (**(code **)(*piVar9 + 0x188))();
        (**(code **)(*piVar9 + 0x18c))();
        puVar13 = ::operator_new(0x5c);
        uVar17 = *(undefined4 *)(param_1 + 0x34);
        puVar13[8] = 0;
        puVar13[9] = 0;
        puVar13[10] = 0;
        puVar13[3] = 0;
        puVar13[4] = 0;
        puVar13[5] = 0;
        puVar13[6] = 0;
        puVar13[7] = 0;
        puVar13[2] = 0;
        *(undefined1 *)(puVar13 + 0xc) = 0;
        *(undefined1 *)((int)puVar13 + 0x31) = 0;
        puVar13[0xb] = 0;
        *puVar13 = &PTR__PunchVictim_00d230a8;
        puVar13[1] = &PTR__PunchVictim_00d2320c;
        puVar13[0xe] = &PTR_NetworkStateChanged_00c0b6e0;
        puVar13[0xf] = 0;
        puVar13[0x10] = 0xbf800000;
        puVar13[0x11] = &PTR_NetworkStateChanged_00c23e10;
        puVar13[0x12] = 0xbf800000;
        puVar13[0x13] = &PTR_NetworkStateChanged_00c0b6e0;
        puVar13[0x14] = 0;
        puVar13[0x15] = 0xbf800000;
        puVar13[0x16] = 0xffffffff;
        puVar13[0xd] = uVar17;
                    /* try { // try from 00a2c474 to 00a2c476 has its CatchHandler @ 00a2c9c3 */
        puVar18 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))();
        puVar13[0x16] = *puVar18;
        *(undefined4 *)(param_1 + 0x20) = 0;
        *(undefined4 *)(param_1 + 0x24) = 0;
        *(undefined4 *)(param_1 + 0x28) = 0;
        *(undefined4 *)(param_1 + 0x2c) = 0;
        *(undefined4 *)this = 2;
        *(undefined4 **)(this + 4) = puVar13;
        *(undefined4 *)(this + 8) = 0;
        pfVar20 = (float *)&stack0xfffffef0;
        goto LAB_00a2b1c5;
      }
      cVar7 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x114))();
      pfVar20 = (float *)&stack0xfffffef0;
      if (cVar7 != '\0') {
        cVar7 = (**(code **)(*(int *)this_00 + 0x16c))();
        if (cVar7 != '\0') {
          cVar7 = (**(code **)(*(int *)this_00 + 0x16c))();
          pCVar16 = (CBaseEntity *)0x0;
          if (cVar7 != '\0') {
            pCVar16 = this_00;
          }
          cVar7 = (**(code **)(*(int *)pCVar16 + 0x7e8))();
          pfVar20 = (float *)&stack0xfffffef0;
          if (cVar7 != '\0') goto LAB_00a2b327;
        }
        lVar22 = (longdouble)CountdownTimer::Now();
        pfVar20 = (float *)&stack0xfffffef0;
        if (((*(float *)(param_1 + 0x4850) <= (float)lVar22) &&
            (cVar7 = CBaseAnimatingOverlay::IsPlayingGesture(), pfVar20 = (float *)&stack0xfffffef0,
            cVar7 == '\0')) &&
           (cVar7 = (**(code **)(*piVar11 + 0xe4))(), pfVar20 = (float *)&stack0xfffffef0,
           cVar7 != '\0')) {
          CBaseAnimatingOverlay::AddGesture();
          fVar2 = *(float *)(ZombieAttackInterval._28_4_ + 0x2c);
          lVar22 = (longdouble)CountdownTimer::Now();
          if ((float)lVar22 + fVar2 != *(float *)(param_1 + 0x4850)) {
            (**(code **)(*(int *)(param_1 + 0x4848) + 4))();
            *(float *)(param_1 + 0x4850) = (float)lVar22 + fVar2;
          }
          pfVar20 = (float *)&stack0xfffffef0;
          if (fVar2 != *(float *)(param_1 + 0x484c)) {
            (**(code **)(*(int *)(param_1 + 0x4848) + 4))();
            *(float *)(param_1 + 0x484c) = fVar2;
            pfVar20 = (float *)&stack0xfffffef0;
          }
        }
      }
    }
  }
LAB_00a2b327:
  iVar12 = *(int *)this_00;
  *pfVar20 = (float)this_00;
  pcVar5 = *(code **)(iVar12 + 0x16c);
  pfVar20[-1] = 1.4941634e-38;
  cVar7 = (*pcVar5)();
  if (cVar7 != '\0') {
    iVar12 = *(int *)this_00;
    *pfVar20 = (float)this_00;
    pcVar5 = *(code **)(iVar12 + 0x16c);
    pfVar20[-1] = 1.4943249e-38;
    cVar7 = (*pcVar5)();
    pCVar16 = (CBaseEntity *)0x0;
    if (cVar7 != '\0') {
      pCVar16 = this_00;
    }
    iVar12 = *(int *)pCVar16;
    *pfVar20 = (float)pCVar16;
    pcVar5 = *(code **)(iVar12 + 0x550);
    pfVar20[-1] = 1.4943274e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 == '\0') {
      iVar12 = *piVar11;
      *pfVar20 = (float)piVar11;
      pcVar5 = *(code **)(iVar12 + 0xb4);
      pfVar20[-1] = 1.494331e-38;
      pCVar16 = (CBaseEntity *)(*pcVar5)();
      if ((this_00 != pCVar16) && (pCVar16 != (CBaseEntity *)0x0)) {
        *pfVar20 = (float)pCVar16;
        pfVar20[-1] = 1.4943346e-38;
        cVar7 = InfectedAttack::IsValidEnemy((CBaseEntity *)*pfVar20);
        if (cVar7 != '\0') {
          iVar12 = (int)param_2 + 0x1a3c;
          iVar14 = *(int *)((int)param_2 + 0x1a3c);
          pfVar20[1] = (float)pCVar16;
          *pfVar20 = (float)iVar12;
          pcVar5 = *(code **)(iVar14 + 300);
          pfVar20[-1] = 1.4943403e-38;
          lVar22 = (longdouble)(*pcVar5)();
          iVar14 = *(int *)((int)param_2 + 0x1a3c);
          pfVar20[1] = (float)this_00;
          *pfVar20 = (float)iVar12;
          pcVar5 = *(code **)(iVar14 + 300);
          pfVar20[-1] = 1.4943447e-38;
          lVar23 = (longdouble)(*pcVar5)();
          if ((float)lVar22 < (float)lVar23) {
            iVar14 = *(int *)((int)param_2 + 0x1a3c);
            fVar2 = *(float *)(ZombieAttackChangeTargetRange._28_4_ + 0x2c);
            pfVar20[1] = (float)pCVar16;
            *pfVar20 = (float)iVar12;
            pfVar20[2] = fVar2;
            pcVar5 = *(code **)(iVar14 + 0x114);
            pfVar20[-1] = 1.4943544e-38;
            cVar7 = (*pcVar5)();
            if (cVar7 != '\0') {
              iVar12 = *(int *)(param_1 + 0x34);
              iVar14 = *(int *)pCVar16;
              *pfVar20 = (float)pCVar16;
              pcVar5 = *(code **)(iVar14 + 0xc);
              pfVar20[-1] = 1.4943574e-38;
              puVar13 = (undefined4 *)(*pcVar5)();
              *(undefined4 *)(iVar12 + 0x34) = *puVar13;
              this_00 = pCVar16;
            }
          }
        }
      }
    }
  }
  iVar12 = *(int *)param_2;
  *pfVar20 = param_2;
  pcVar5 = *(code **)(iVar12 + 0x590);
  pfVar20[-1] = 1.494166e-38;
  piVar15 = (int *)(*pcVar5)();
  iVar12 = *piVar15;
  *pfVar20 = (float)piVar15;
  pcVar5 = *(code **)(iVar12 + 0xd8);
  pfVar20[-1] = 1.4941676e-38;
  (*pcVar5)();
  fVar2 = (float)((int)param_2 + 0x1a3c);
  local_34 = &PTR_operator___00d20e60;
  iVar12 = *(int *)((int)param_2 + 0x1a3c);
  *pfVar20 = fVar2;
  pcVar5 = *(code **)(iVar12 + 0xc0);
  pfVar20[-1] = 1.494173e-38;
  local_30 = fVar2;
  local_28 = (*pcVar5)();
  iVar12 = *(int *)((int)param_2 + 0x1a3c);
  *pfVar20 = fVar2;
  pcVar5 = *(code **)(iVar12 + 0xb4);
  pfVar20[-1] = 1.4941755e-38;
  piVar15 = (int *)(*pcVar5)();
  iVar12 = *piVar15;
  *pfVar20 = (float)piVar15;
  pcVar5 = *(code **)(iVar12 + 0x14c);
  pfVar20[-1] = 1.4941774e-38;
  iVar12 = (*pcVar5)();
  if (iVar12 == 0) {
    local_24 = 0x3f800000;
  }
  else {
    local_24 = *(undefined4 *)(iVar12 + 0x1cec);
  }
  iVar12 = *piVar15;
  *pfVar20 = (float)piVar15;
  pcVar5 = *(code **)(iVar12 + 0x16c);
  pfVar20[-1] = 1.4941819e-38;
  cVar7 = (*pcVar5)();
  *pfVar20 = (float)piVar15;
  local_2c = (int *)0x0;
  if (cVar7 != '\0') {
    local_2c = piVar15;
  }
  pfVar20[-1] = 1.4941844e-38;
  iVar12 = CBaseEntity::GetTeamNumber((CBaseEntity *)*pfVar20);
  local_20 = 9;
  if (iVar12 == 3) {
    iVar12 = *piVar15;
    *pfVar20 = (float)piVar15;
    pcVar5 = *(code **)(iVar12 + 0x544);
    pfVar20[-1] = 1.494678e-38;
    local_20 = (*pcVar5)();
  }
  pIVar1 = param_1 + 0x38;
  iVar12 = *(int *)((int)param_2 + 0x1a3c);
  *pfVar20 = fVar2;
  pcVar5 = *(code **)(iVar12 + 0xc0);
  pfVar20[-1] = 1.4941905e-38;
  piVar15 = (int *)(*pcVar5)();
  iVar12 = *(int *)((int)param_2 + 0x1a3c);
  *pfVar20 = fVar2;
  pcVar5 = *(code **)(iVar12 + 0x104);
  pfVar20[-1] = 1.4941943e-38;
  cVar7 = (*pcVar5)();
  if (cVar7 == '\0') {
    iVar12 = *piVar15;
    *pfVar20 = (float)piVar15;
    pcVar5 = *(code **)(iVar12 + 0xd4);
    pfVar20[-1] = 1.4946116e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 != '\0') goto LAB_00a2b417;
    iVar12 = *(int *)(param_1 + 0x38);
    pfVar20[3] = -1.0;
    pfVar20[2] = 2.8026e-45;
    pfVar20[1] = fVar2;
    *pfVar20 = (float)pIVar1;
    pcVar5 = *(code **)(iVar12 + 0x80);
    pfVar20[-1] = 1.4946185e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 != '\0') goto LAB_00a2b417;
    iVar12 = *(int *)(param_1 + 0x38);
    pfVar20[3] = -1.0;
    pfVar20[2] = 4.2039e-45;
    pfVar20[1] = fVar2;
    *pfVar20 = (float)pIVar1;
    pcVar5 = *(code **)(iVar12 + 0x80);
    pfVar20[-1] = 1.4946254e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 != '\0') goto LAB_00a2b417;
    iVar12 = *(int *)(param_1 + 0x38);
    pfVar20[3] = (float)this_00;
    pfVar20[2] = fVar2;
    pfVar20[1] = (float)pIVar1;
    *pfVar20 = (float)&local_4c;
    pcVar5 = *(code **)(iVar12 + 0x90);
    pfVar20[-1] = 1.4946326e-38;
    (*pcVar5)();
    pfVar21 = pfVar20 + -1;
    local_58 = local_4c;
    local_54 = local_48;
    local_50 = local_44;
    iVar12 = *piVar15;
    pcVar5 = *(code **)(iVar12 + 0x158);
    pfVar20[-1] = (float)piVar15;
    pcVar6 = *(code **)(iVar12 + 300);
    pfVar20[-2] = 1.4946413e-38;
    uVar17 = (*pcVar6)();
    pfVar20[3] = 0.0;
    pfVar20[2] = 0.0;
    *pfVar20 = (float)uVar17;
    pfVar20[1] = (float)&local_4c;
    pfVar20[-1] = (float)piVar15;
    pfVar20[-2] = 1.4946479e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 == '\0') {
LAB_00a2c86c:
      local_b4 = &local_58;
      pfVar21 = pfVar20 + -1;
      goto LAB_00a2b421;
    }
    if (*(int *)(DirectChaseNavCheck._28_4_ + 0x30) != 0) {
      iVar12 = *piVar15;
      pfVar20[-1] = (float)piVar15;
      pcVar5 = *(code **)(iVar12 + 300);
      pfVar20[-2] = 1.4949199e-38;
      uVar17 = (*pcVar5)();
      *pfVar20 = (float)uVar17;
      pfVar20[1] = (float)&local_4c;
      pfVar20[-1] = (float)TheNavMesh;
      pfVar20[-2] = 1.4949237e-38;
      cVar7 = CNavMesh::DoesRayStayWithinMesh
                        ((CNavMesh *)pfVar20[-1],(Vector *)*pfVar20,(Vector *)pfVar20[1]);
      if (cVar7 == '\0') goto LAB_00a2c86c;
    }
    iVar12 = *piVar15;
    pfVar20[-1] = (float)piVar15;
    *pfVar20 = (float)&local_4c;
    pcVar5 = *(code **)(iVar12 + 0x120);
    pfVar20[-2] = 1.494655e-38;
    (*pcVar5)();
    iVar12 = *piVar15;
    pfVar20[1] = 1.0;
    *pfVar20 = (float)&local_4c;
    pfVar20[-1] = (float)piVar15;
    pcVar5 = *(code **)(iVar12 + 0xb4);
    pfVar20[-2] = 1.49466e-38;
    (*pcVar5)();
    iVar12 = *(int *)((int)param_2 + 0x1a3c);
    pfVar20[-1] = fVar2;
    pcVar5 = *(code **)(iVar12 + 0xc4);
    pfVar20[-2] = 1.4946629e-38;
    piVar15 = (int *)(*pcVar5)();
    iVar12 = *piVar15;
    pfVar20[6] = 0.25;
    pfVar20[5] = 1.4013e-45;
    pfVar20[4] = 0.0;
    pfVar20[3] = 0.0;
    pfVar20[2] = 0.0;
    pfVar20[1] = 0.0;
    *pfVar20 = (float)this_00;
    pfVar20[-1] = (float)piVar15;
    pcVar5 = *(code **)(iVar12 + 0xc4);
    pfVar20[-2] = 1.4946717e-38;
    (*pcVar5)();
    iVar12 = *(int *)(param_1 + 0x38);
    pfVar20[-1] = (float)pIVar1;
    pcVar5 = *(code **)(iVar12 + 0x48);
    pfVar20[-2] = 1.4946734e-38;
    (*pcVar5)();
    param_1[0x4844] = (Infected)0x1;
  }
  else {
LAB_00a2b417:
    local_b4 = (float *)0x0;
    pfVar21 = pfVar20;
LAB_00a2b421:
    local_7c = 0;
    local_78 = 0.0;
    if (_towlower == 0) {
      local_38 = 0;
    }
    else {
      pfVar21[0xb] = (float)"ChasePath::Update";
      pfVar21[10] = (float)"NextBot";
      pfVar21[9] = (float)"(%s)%s";
      pfVar21[8] = (float)&ChasePath::Update(INextBot*,CBaseEntity*,IPathCost_const&,Vector*)::
                           tm_fmt;
      pfVar21[7] = 1.45735e-43;
      pfVar21[6] = (float)"/data/src/game/server/nextbot/path/nextbotchasepath.h";
      pfVar21[5] = 0.0;
      pfVar21[3] = 0.0;
      pfVar21[4] = 0.0;
      pfVar21[2] = 0.0;
      pfVar21[1] = (float)&local_7c;
      *pfVar21 = (float)_towlower;
      pcVar5 = *(code **)(_towlower + 0x50);
      pfVar21[-1] = 1.4942137e-38;
      (*pcVar5)();
      local_38 = _towlower;
    }
    iVar12 = _DAT_0105db00;
    local_40 = local_7c;
    local_3c = local_78;
    if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 00a2b4cc to 00a2b4d0 has its CatchHandler @ 00a2c9b2 */
      pfVar21[-1] = 1.4942215e-38;
      iVar14 = ThreadGetCurrentId();
      if (iVar12 == iVar14) {
        if ((char *)*_DAT_0105d15c != "ChasePath::Update") {
          pfVar21[4] = 5.60519e-45;
          pfVar21[3] = (float)"NextBot";
          pfVar21[2] = 0.0;
          pfVar21[1] = (float)"ChasePath::Update";
          *pfVar21 = (float)_DAT_0105d15c;
                    /* try { // try from 00a2c530 to 00a2c553 has its CatchHandler @ 00a2c9b2 */
          pfVar21[-1] = 1.4948095e-38;
          _DAT_0105d15c =
               (int *)CVProfNode::GetSubNode
                                ((char *)*pfVar21,(int)pfVar21[1],(char *)pfVar21[2],(int)pfVar21[3]
                                );
        }
        puVar3 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
        *puVar3 = *puVar3 | 4;
        *pfVar21 = (float)_DAT_0105d15c;
        pfVar21[-1] = 1.4948138e-38;
        CVProfNode::EnterScope();
        DAT_0105d158 = '\0';
      }
    }
    pfVar21[2] = (float)this_00;
    *pfVar21 = (float)pIVar1;
    pfVar21[4] = (float)local_b4;
    pfVar21[3] = (float)&local_34;
    pfVar21[1] = fVar2;
                    /* try { // try from 00a2b4ff to 00a2b515 has its CatchHandler @ 00a2c9d9 */
    pfVar21[-1] = 1.4942287e-38;
    ChasePath::RefreshPath
              ((ChasePath *)*pfVar21,(INextBot *)pfVar21[1],(CBaseEntity *)pfVar21[2],
               (IPathCost *)pfVar21[3],(Vector *)pfVar21[4]);
    *pfVar21 = (float)pIVar1;
    pfVar21[1] = fVar2;
    pfVar21[-1] = 1.4942312e-38;
    PathFollower::Update((PathFollower *)*pfVar21,(INextBot *)pfVar21[1]);
    iVar12 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      pfVar21[-1] = 1.4942361e-38;
      iVar14 = ThreadGetCurrentId();
      if (iVar12 == iVar14) {
        *pfVar21 = (float)_DAT_0105d15c;
        pfVar21[-1] = 1.494796e-38;
        cVar7 = CVProfNode::ExitScope();
        if (cVar7 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_38 != 0) {
      pfVar21[5] = 0.0;
      pfVar21[4] = 0.0;
      pfVar21[3] = 0.0;
      *pfVar21 = (float)local_38;
      pfVar21[1] = (float)local_40;
      pfVar21[2] = local_3c;
      pcVar5 = *(code **)(local_38 + 0x54);
      pfVar21[-1] = 1.4942449e-38;
      (*pcVar5)();
    }
    iVar12 = *(int *)(param_1 + 0x38);
    *pfVar21 = (float)pIVar1;
                    /* try { // try from 00a2b581 to 00a2b89a has its CatchHandler @ 00a2c98d */
    pcVar5 = *(code **)(iVar12 + 0x44);
    pfVar21[-1] = 1.4942466e-38;
    IVar8 = (Infected)(*pcVar5)();
    param_1[0x4844] = IVar8;
  }
  pfVar21[2] = (float)this_00;
  *pfVar21 = (float)pIVar1;
  pfVar21[1] = fVar2;
  pfVar21[-1] = 1.494251e-38;
  DirectChasePath::NotifyVictim
            ((DirectChasePath *)*pfVar21,(INextBot *)pfVar21[1],(CBaseEntity *)pfVar21[2]);
  pfVar21[2] = (float)pIVar1;
  pfVar21[1] = (float)this_00;
  *pfVar21 = param_2;
  pfVar21[-1] = 1.4942532e-38;
  AvoidNeighbors((Infected *)*pfVar21,(CBaseEntity *)pfVar21[1],(PathFollower *)pfVar21[2]);
  iVar12 = *piVar9;
  *pfVar21 = (float)piVar9;
  pcVar5 = *(code **)(iVar12 + 200);
  pfVar21[-1] = 1.4942556e-38;
  cVar7 = (*pcVar5)();
  if (cVar7 == '\0') {
    iVar12 = *piVar9;
    *pfVar21 = (float)piVar9;
    pcVar5 = *(code **)(iVar12 + 0x114);
    pfVar21[-1] = 1.4945847e-38;
    cVar7 = (*pcVar5)();
    if (cVar7 == '\0') {
      iVar12 = *piVar9;
      *pfVar21 = (float)piVar9;
      pcVar5 = *(code **)(iVar12 + 0xf8);
      pfVar21[-1] = 1.4945882e-38;
      cVar7 = (*pcVar5)();
      if (cVar7 != '\0') {
        if (param_1[0x4844] == (Infected)0x0) {
          iVar12 = *piVar10;
          pfVar21[1] = 8.67404e-43;
          *pfVar21 = (float)piVar10;
          pcVar5 = *(code **)(iVar12 + 0xe4);
          pfVar21[-1] = 1.4946902e-38;
          cVar7 = (*pcVar5)();
          if (cVar7 == '\0') {
            iVar12 = *piVar10;
            pfVar21[2] = 1.4013e-45;
            pfVar21[1] = 8.67404e-43;
            *pfVar21 = (float)piVar10;
            pcVar5 = *(code **)(iVar12 + 0xd8);
            pfVar21[-1] = 1.494822e-38;
            (*pcVar5)();
          }
          if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
            *pfVar21 = param_2;
                    /* try { // try from 00a2c563 to 00a2c58d has its CatchHandler @ 00a2c98d */
            pfVar21[-1] = 1.4948166e-38;
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*pfVar21);
          }
          if (((byte)this_00[0x14d] & 8) != 0) {
            *pfVar21 = (float)this_00;
            pfVar21[-1] = 1.4946956e-38;
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*pfVar21);
          }
          local_4c = *(float *)(this_00 + 0x2e0) - *(float *)((int)param_2 + 0x2e0);
          local_48 = *(float *)(this_00 + 0x2e4) - *(float *)((int)param_2 + 0x2e4);
          local_44 = *(float *)(this_00 + 0x2e8) - *(float *)((int)param_2 + 0x2e8);
          pfVar21[1] = (float)&local_58;
          *pfVar21 = (float)&local_4c;
          pfVar21[-1] = 1.4947069e-38;
          VectorAngles((Vector *)*pfVar21,(QAngle *)pfVar21[1]);
          if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
            *pfVar21 = param_2;
            pfVar21[-1] = 1.4947093e-38;
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*pfVar21);
          }
          local_40 = *(int *)((int)param_2 + 0x37c);
          local_3c = local_54;
          local_38 = *(int *)((int)param_2 + 900);
          *pfVar21 = param_2;
          pfVar21[1] = (float)&local_40;
          pfVar21[-1] = 1.4947153e-38;
          CBaseEntity::SetAbsAngles((CBaseEntity *)*pfVar21,(QAngle *)pfVar21[1]);
        }
        else {
          iVar12 = *piVar10;
          if ((*(byte *)((int)param_2 + 0x1c74) & 4) == 0) {
            pfVar21[1] = 0.0;
            *pfVar21 = (float)piVar10;
            pcVar5 = *(code **)(iVar12 + 0x100);
            pfVar21[-1] = 1.4945969e-38;
            cVar7 = (*pcVar5)();
            iVar12 = *piVar10;
            if (cVar7 == '\0') {
              pfVar21[1] = 8.51989e-43;
              *pfVar21 = (float)piVar10;
              pcVar5 = *(code **)(iVar12 + 0xe4);
              pfVar21[-1] = 1.4947192e-38;
              cVar7 = (*pcVar5)();
              if (cVar7 == '\0') {
                iVar12 = *piVar10;
                pfVar21[2] = 0.0;
                pfVar21[1] = 8.51989e-43;
                *pfVar21 = (float)piVar10;
                pcVar5 = *(code **)(iVar12 + 0xd8);
                pfVar21[-1] = 1.494725e-38;
                (*pcVar5)();
              }
            }
            else {
              pfVar21[1] = 8.36575e-43;
              *pfVar21 = (float)piVar10;
              pcVar5 = *(code **)(iVar12 + 0xe4);
              pfVar21[-1] = 1.4946015e-38;
              cVar7 = (*pcVar5)();
              if (cVar7 == '\0') {
                iVar12 = *piVar10;
                pfVar21[2] = 0.0;
                pfVar21[1] = 8.36575e-43;
                *pfVar21 = (float)piVar10;
                pcVar5 = *(code **)(iVar12 + 0xd8);
                pfVar21[-1] = 1.4946073e-38;
                (*pcVar5)();
              }
            }
          }
          else {
            pfVar21[1] = 8.53391e-43;
            *pfVar21 = (float)piVar10;
            pcVar5 = *(code **)(iVar12 + 0xe4);
            pfVar21[-1] = 1.4947372e-38;
            cVar7 = (*pcVar5)();
            if (cVar7 == '\0') {
              iVar12 = *piVar10;
              pfVar21[2] = 0.0;
              pfVar21[1] = 8.53391e-43;
              *pfVar21 = (float)piVar10;
              pcVar5 = *(code **)(iVar12 + 0xd8);
              pfVar21[-1] = 1.494743e-38;
              (*pcVar5)();
            }
          }
        }
      }
    }
  }
  pIVar1 = param_1 + 0x4860;
  *pfVar21 = (float)pIVar1;
  pfVar21[-1] = 1.494259e-38;
  lVar22 = (longdouble)CountdownTimer::Now();
  if (*(float *)(param_1 + 0x4868) <= (float)lVar22) {
    if (piVar11 == (int *)0x0) {
LAB_00a2b618:
      pfVar21[2] = 0.0;
      pfVar21[1] = (float)"Zombie.RageAtVictim";
      *pfVar21 = param_2;
      pfVar21[-1] = 1.4942707e-38;
      Infected::Vocalize((Infected *)*pfVar21,(char *)pfVar21[1],*(bool *)(pfVar21 + 2));
    }
    else {
      iVar12 = *piVar11;
      *pfVar21 = (float)piVar11;
      pcVar5 = *(code **)(iVar12 + 0xb4);
      pfVar21[-1] = 1.4942662e-38;
      iVar12 = (*pcVar5)();
      if (iVar12 != 0) goto LAB_00a2b618;
      pfVar21[2] = 0.0;
      pfVar21[1] = (float)"Zombie.Rage";
      *pfVar21 = param_2;
                    /* try { // try from 00a2c82e to 00a2c8df has its CatchHandler @ 00a2c98d */
      pfVar21[-1] = 1.4949168e-38;
      Infected::Vocalize((Infected *)*pfVar21,(char *)pfVar21[1],*(bool *)(pfVar21 + 2));
    }
    pfVar21[1] = 2.0;
    *pfVar21 = 1.0;
    pfVar21[-1] = 1.4942735e-38;
    lVar22 = (longdouble)RandomFloat();
    fVar2 = (float)lVar22;
    *pfVar21 = (float)pIVar1;
    pfVar21[-1] = 1.4942755e-38;
    lVar22 = (longdouble)CountdownTimer::Now();
    if ((float)lVar22 + fVar2 != *(float *)(param_1 + 0x4868)) {
      iVar12 = *(int *)(param_1 + 0x4860);
      *pfVar21 = (float)pIVar1;
      pfVar21[1] = (float)(param_1 + 0x4868);
      pcVar5 = *(code **)(iVar12 + 4);
      pfVar21[-1] = 1.4947316e-38;
      (*pcVar5)();
      *(float *)(param_1 + 0x4868) = (float)lVar22 + fVar2;
    }
    if (fVar2 != *(float *)(param_1 + 0x4864)) {
      iVar12 = *(int *)(param_1 + 0x4860);
      *pfVar21 = (float)pIVar1;
      pfVar21[1] = (float)(param_1 + 0x4864);
      pcVar5 = *(code **)(iVar12 + 4);
      pfVar21[-1] = 1.4946834e-38;
      (*pcVar5)();
      *(float *)(param_1 + 0x4864) = fVar2;
    }
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  pfVar20 = pfVar21;
LAB_00a2b1c5:
  iVar12 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    pfVar20[-1] = 1.4941163e-38;
    iVar14 = ThreadGetCurrentId();
    if (iVar12 == iVar14) {
      *pfVar20 = (float)_DAT_0105d15c;
      pfVar20[-1] = 1.4943644e-38;
      cVar7 = CVProfNode::ExitScope();
      if (cVar7 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_68 != 0) {
    pfVar20[5] = 0.0;
    pfVar20[4] = 0.0;
    pfVar20[3] = 0.0;
    *pfVar20 = (float)local_68;
    pfVar20[1] = (float)local_70;
    pfVar20[2] = (float)local_6c;
    pcVar5 = *(code **)(local_68 + 0x54);
    pfVar20[-1] = 1.4941245e-38;
    (*pcVar5)();
  }
  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)