L L4D2node

ChasePath::RefreshPath

0x003e5420 · 7122 bytes · __thiscall

_ZN9ChasePath11RefreshPathEP8INextBotP11CBaseEntityRK9IPathCostP6Vector

Decompiled

undefined (5 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ChasePath::RefreshPath(INextBot*, CBaseEntity*, IPathCost const&, Vector*) */

void __thiscall
ChasePath::RefreshPath
          (ChasePath *this,INextBot *param_1,CBaseEntity *param_2,IPathCost *param_3,Vector *param_4
          )

{
  ChasePath *pCVar1;
  uint *puVar2;
  byte bVar3;
  uint uVar4;
  code *pcVar5;
  char cVar6;
  bool bVar7;
  int *piVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  undefined4 uVar13;
  undefined4 *puVar14;
  int *piVar15;
  undefined *puVar16;
  ChasePath *pCVar17;
  int *piVar18;
  longdouble lVar19;
  longdouble lVar20;
  float fVar21;
  undefined4 uStack_130;
  int local_e0;
  int local_d8;
  int local_d4;
  int local_d0;
  int local_cc;
  int local_c8;
  int local_c4;
  int local_c0;
  int local_bc;
  int local_b8;
  int local_b4;
  int local_b0;
  int local_ac;
  int local_a8;
  int local_a4;
  int local_a0;
  int local_9c;
  float local_98;
  int local_94;
  int local_90;
  float local_8c;
  int local_88;
  int local_84;
  int local_80;
  int local_7c;
  int local_78;
  float local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  int local_64;
  int local_60;
  int local_5c;
  int local_58;
  int local_54;
  int local_50;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  int local_40;
  int local_3c;
  int local_38;
  int local_34;
  int local_30;
  float local_2c;
  undefined4 local_28;
  undefined4 local_24;
  float local_20;
  
  piVar18 = (int *)&stack0xfffffed4;
  local_cc = 0;
  local_c8 = 0;
  if (_towlower == 0) {
    local_a4 = 0;
  }
  else {
    uStack_130 = 0x3e54b3;
    (**(code **)(_towlower + 0x50))();
    local_a4 = _towlower;
  }
  iVar10 = _DAT_0105db00;
  local_ac = local_cc;
  local_a8 = local_c8;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 003e5c96 to 003e5cf6 has its CatchHandler @ 003e70fe */
    uStack_130 = 0x3e5c9b;
    iVar9 = ThreadGetCurrentId();
    if (iVar10 == iVar9) {
      if ((char *)*_DAT_0105d15c != "ChasePath::RefreshPath") {
        uStack_130 = 0x3e5cd8;
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xbfa1a0,(char *)0x0,0xca8906);
      }
      puVar2 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
      *puVar2 = *puVar2 | 4;
      uStack_130 = 0x3e5cf7;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 003e54f7 to 003e57ca has its CatchHandler @ 003e7102 */
  uStack_130 = 0x3e54fd;
  piVar8 = (int *)(**(code **)(*(int *)param_1 + 0xc0))();
  uStack_130 = 0x3e5507;
  cVar6 = (**(code **)(*(int *)this + 0x44))();
  if (cVar6 != '\0') {
                    /* try { // try from 003e5d1d to 003e5df7 has its CatchHandler @ 003e7102 */
    uStack_130 = 0x3e5d23;
    cVar6 = (**(code **)(*piVar8 + 0x114))();
    if (cVar6 != '\0') {
      uStack_130 = 0x3e5d3b;
      cVar6 = INextBot::IsDebugging(param_1,4);
      if (cVar6 != '\0') {
        uStack_130 = 0x3e5d4a;
        (**(code **)(*(int *)param_1 + 0xb4))();
        uStack_130 = 0x3e5d7b;
        DevMsg("%3.2f: bot(#%d) ChasePath::RefreshPath failed. Bot is on a ladder.\n");
      }
      uStack_130 = 0x3e5d89;
      lVar19 = (longdouble)CountdownTimer::Now();
      if ((float)lVar19 + 1.0 != *(float *)(this + 0x47f4)) {
        uStack_130 = 0x3e66a6;
        (**(code **)(*(int *)(this + 0x47ec) + 4))();
        *(float *)(this + 0x47f4) = (float)lVar19 + 1.0;
      }
      if (*(float *)(this + 0x47f0) != 1.0) {
        uStack_130 = 0x3e5dd9;
        (**(code **)(*(int *)(this + 0x47ec) + 4))();
        *(undefined4 *)(this + 0x47f0) = 0x3f800000;
      }
      goto LAB_003e5e00;
    }
  }
  if (param_2 == (CBaseEntity *)0x0) {
    uStack_130 = 0x3e5ff8;
    cVar6 = INextBot::IsDebugging(param_1,4);
    if (cVar6 != '\0') {
      uStack_130 = 0x3e600b;
      (**(code **)(*(int *)param_1 + 0xb4))();
      uStack_130 = 0x3e603c;
      DevMsg("%3.2f: bot(#%d) CasePath::RefreshPath failed. No subject.\n");
    }
LAB_003e5e00:
    iVar10 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      uStack_130 = 0x3e5e1e;
      iVar9 = ThreadGetCurrentId();
      if (iVar10 == iVar9) {
        uStack_130 = 0x3e5f35;
        cVar6 = CVProfNode::ExitScope();
        if (cVar6 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_a4 != 0) {
      uStack_130 = 0x3e5e62;
      (**(code **)(local_a4 + 0x54))();
    }
    return;
  }
  pCVar1 = this + 0x47e0;
  uStack_130 = 0x3e552e;
  lVar19 = (longdouble)CountdownTimer::Now();
  if ((float)lVar19 < *(float *)(this + 0x47e8)) {
    uStack_130 = 0x3e5df8;
    cVar6 = INextBot::IsDebugging(param_1,4);
    if (cVar6 != '\0') {
      uStack_130 = 0x3e675b;
      (**(code **)(*(int *)param_1 + 0xb4))();
      uStack_130 = 0x3e678c;
      DevMsg("%3.2f: bot(#%d) ChasePath::RefreshPath failed. Fail timer not elapsed.\n");
    }
    goto LAB_003e5e00;
  }
  uVar4 = *(uint *)(this + 0x4804);
  if ((((uVar4 == 0xffffffff) ||
       (puVar16 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar16 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar16 + 8) != uVar4 >> 0xc)) || (param_2 != *(CBaseEntity **)(puVar16 + 4))) {
    uStack_130 = 0x3e558a;
    cVar6 = INextBot::IsDebugging(param_1,4);
    if (cVar6 != '\0') {
      uStack_130 = 0x3e55cc;
      (**(code **)(*(int *)param_1 + 0xb4))();
      uStack_130 = 0x3e5608;
      DevMsg("%3.2f: bot(#%d) Chase path subject changed (from %p to %p).\n");
    }
    uStack_130 = 0x3e5610;
    (**(code **)(*(int *)this + 0x48))();
    if (*(float *)(this + 0x47e8) != -1.0) {
      uStack_130 = 0x3e6064;
      (**(code **)(*(int *)(this + 0x47e0) + 4))();
      *(undefined4 *)(this + 0x47e8) = 0xbf800000;
    }
  }
  uStack_130 = 0x3e562d;
  cVar6 = (**(code **)(*(int *)this + 0x44))();
  if (cVar6 != '\0') {
                    /* try { // try from 003e5f69 to 003e6135 has its CatchHandler @ 003e7102 */
    uStack_130 = 0x3e5f6e;
    lVar19 = (longdouble)CountdownTimer::Now();
    if ((float)lVar19 < *(float *)(this + 0x47f4)) {
      uStack_130 = 0x3e5f99;
      cVar6 = INextBot::IsDebugging(param_1,4);
      if (cVar6 != '\0') {
        uStack_130 = 0x3e5fac;
        (**(code **)(*(int *)param_1 + 0xb4))();
        uStack_130 = 0x3e5fdd;
        DevMsg("%3.2f: bot(#%d) ChasePath::RefreshPath failed. Rate throttled.\n");
      }
      goto LAB_003e5e00;
    }
  }
  uStack_130 = 0x3e563d;
  cVar6 = (**(code **)(*(int *)this + 0x44))();
  if ((cVar6 != '\0') && (0.0 < *(float *)(this + 0x4800))) {
    uStack_130 = 0x3e565b;
    lVar19 = (longdouble)CountdownTimer::Now();
    if (*(float *)(this + 0x4800) <= (float)lVar19) {
                    /* try { // try from 003e67c5 to 003e6855 has its CatchHandler @ 003e7102 */
      uStack_130 = 0x3e67c8;
      (**(code **)(*(int *)this + 0x48))();
    }
  }
  uStack_130 = 0x3e5688;
  cVar6 = (**(code **)(*(int *)this + 0x44))();
  if (cVar6 != '\0') {
                    /* try { // try from 003e5e98 to 003e5e9d has its CatchHandler @ 003e7102 */
    uStack_130 = 0x3e5e9e;
    cVar6 = (**(code **)(*(int *)this + 0x94))();
    piVar8 = (int *)&stack0xfffffed4;
    if (cVar6 == '\0') goto LAB_003e5c20;
  }
  if (((byte)param_2[0x14d] & 8) != 0) {
    uStack_130 = 0x3e6833;
    CBaseEntity::CalcAbsolutePosition(param_2);
  }
  local_a0 = *(int *)(param_2 + 0x2e0);
  local_9c = *(int *)(param_2 + 0x2e4);
  local_98 = *(float *)(param_2 + 0x2e8);
  if (*(int *)(this + 0x4808) == 0) {
    if (param_4 == (Vector *)0x0) {
                    /* try { // try from 003e6ece to 003e6ed3 has its CatchHandler @ 003e7102 */
      uStack_130 = 0x3e6ed4;
      (**(code **)(*(int *)this + 0x90))();
      piVar18 = &uStack_130;
    }
    else {
      local_94 = *(int *)param_4;
      local_90 = *(int *)(param_4 + 4);
      local_8c = *(float *)(param_4 + 8);
      piVar18 = (int *)&stack0xfffffed4;
    }
    iVar10 = *(int *)this;
    *piVar18 = (int)this;
    local_a0 = local_94;
    local_9c = local_90;
    local_98 = local_8c;
    pcVar5 = *(code **)(iVar10 + 0x8c);
    piVar18[-1] = 0x3e5744;
    lVar19 = (longdouble)(*pcVar5)();
    local_c4 = 0;
    local_c0 = 0;
    if (_towlower == 0) {
      local_80 = 0;
    }
    else {
      piVar18[0xb] = (int)"Path::Compute(goal)";
      piVar18[10] = (int)"NextBotSpiky";
      piVar18[9] = (int)"(%s)%s";
      piVar18[8] = (int)&Path::
                         Compute<IPathCost_const>(INextBot*,Vector_const&,IPathCost_const&,float)::
                         tm_fmt;
      piVar18[7] = 0x113;
      piVar18[6] = (int)"/data/src/game/server/nextbot/path/nextbotpath.h";
      piVar18[5] = 0;
      piVar18[3] = 0;
      piVar18[4] = 0;
      piVar18[2] = 0;
      piVar18[1] = (int)&local_c4;
      *piVar18 = _towlower;
      pcVar5 = *(code **)(_towlower + 0x50);
      piVar18[-1] = 0x3e57cb;
      (*pcVar5)();
      local_80 = _towlower;
    }
    iVar10 = _DAT_0105db00;
    local_88 = local_c4;
    local_84 = local_c0;
    if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 003e5eb6 to 003e5f16 has its CatchHandler @ 003e70db */
      piVar18[-1] = 0x3e5ebb;
      iVar9 = ThreadGetCurrentId();
      if (iVar10 == iVar9) {
        if ((char *)*_DAT_0105d15c != "Path::Compute(goal)") {
          piVar18[4] = 4;
          piVar18[3] = (int)"NextBotSpiky";
          piVar18[2] = 0;
          piVar18[1] = (int)"Path::Compute(goal)";
          *piVar18 = (int)_DAT_0105d15c;
          piVar18[-1] = 0x3e5ef8;
          _DAT_0105d15c =
               (int *)CVProfNode::GetSubNode
                                ((char *)*piVar18,piVar18[1],(char *)piVar18[2],piVar18[3]);
        }
        puVar2 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
        *puVar2 = *puVar2 | 4;
        *piVar18 = (int)_DAT_0105d15c;
        piVar18[-1] = 0x3e5f17;
        CVProfNode::EnterScope();
        DAT_0105d158 = '\0';
      }
    }
    iVar10 = *(int *)this;
    *piVar18 = (int)this;
                    /* try { // try from 003e5808 to 003e5ae7 has its CatchHandler @ 003e70bd */
    pcVar5 = *(code **)(iVar10 + 0x48);
    piVar18[-1] = 0x3e580b;
    (*pcVar5)();
    iVar10 = *(int *)param_1;
    *piVar18 = (int)param_1;
    pcVar5 = *(code **)(iVar10 + 0xd4);
    piVar18[-1] = 0x3e5816;
    iVar9 = (*pcVar5)();
    iVar10 = *(int *)param_1;
    *piVar18 = (int)param_1;
    pcVar5 = *(code **)(iVar10 + 0xb4);
    piVar18[-1] = 0x3e5827;
    piVar8 = (int *)(*pcVar5)();
    iVar10 = *piVar8;
    *piVar18 = (int)piVar8;
    pcVar5 = *(code **)(iVar10 + 0x52c);
    piVar18[-1] = 0x3e5832;
    iVar10 = (*pcVar5)();
    if (iVar10 == 0) {
LAB_003e5ad4:
      iVar10 = *(int *)this;
      piVar18[2] = 2;
      piVar18[1] = (int)param_1;
      *piVar18 = (int)this;
      pcVar5 = *(code **)(iVar10 + 100);
      piVar18[-1] = 0x3e5ae8;
      (*pcVar5)();
LAB_003e5ae8:
      bVar7 = false;
    }
    else {
      piVar18[6] = 0;
      piVar18[1] = (int)&local_a0;
      piVar18[5] = 1;
      piVar18[4] = 1;
      piVar18[3] = 0x43480000;
      piVar18[2] = 1;
      *piVar18 = TheNavMesh;
      piVar18[-1] = 0x3e5881;
      iVar11 = CNavMesh::GetNearestNavArea
                         ((CNavMesh *)*piVar18,(Vector *)piVar18[1],SUB41(piVar18[2],0),
                          (float)piVar18[3],SUB41(piVar18[4],0),SUB41(piVar18[5],0),
                          SUB41(piVar18[6],0));
      if (iVar10 == iVar11) {
        piVar18[1] = (int)param_1;
        *piVar18 = (int)this;
        piVar18[2] = (int)&local_a0;
                    /* try { // try from 003e6f0c to 003e6f10 has its CatchHandler @ 003e70bd */
        piVar18[-1] = 0x3e6f11;
        Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
        bVar7 = true;
      }
      else {
        local_7c = local_a0;
        local_78 = local_9c;
        local_74 = local_98;
        if (iVar11 == 0) {
          piVar18[3] = 0;
          piVar18[1] = (int)&local_7c;
          piVar18[2] = (int)&local_74;
          *piVar18 = TheNavMesh;
                    /* try { // try from 003e699b to 003e699f has its CatchHandler @ 003e70bd */
          piVar18[-1] = 0x3e69a0;
          CNavMesh::GetGroundHeight
                    ((CNavMesh *)*piVar18,(Vector *)piVar18[1],(float *)piVar18[2],
                     (Vector *)piVar18[3]);
        }
        else {
          *piVar18 = iVar11;
          piVar18[2] = local_9c;
          piVar18[1] = local_a0;
          piVar18[-1] = 0x3e58d6;
          lVar20 = (longdouble)
                   CNavArea::GetZ((CNavArea *)*piVar18,(float)piVar18[1],(float)piVar18[2]);
          local_74 = (float)lVar20;
        }
        iVar12 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar12 + 0xb4);
        piVar18[-1] = 0x3e58f4;
        iVar12 = (*pcVar5)();
        if ((*(byte *)(iVar12 + 0x14d) & 8) != 0) {
          *piVar18 = iVar12;
                    /* try { // try from 003e67a2 to 003e67a6 has its CatchHandler @ 003e70bd */
          piVar18[-1] = 0x3e67a7;
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar18);
        }
        local_d8 = 0;
        local_70 = *(undefined4 *)(iVar12 + 0x2e0);
        local_6c = *(undefined4 *)(iVar12 + 0x2e4);
        local_68 = *(undefined4 *)(iVar12 + 0x2e8);
        iVar12 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar12 + 0xb4);
        piVar18[-1] = 0x3e593d;
        uVar13 = (*pcVar5)();
        *piVar18 = uVar13;
        piVar18[-1] = 0x3e5945;
        iVar12 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar18);
        piVar18[7] = iVar12;
        piVar18[5] = (int)&local_d8;
        piVar18[8] = 0;
        piVar18[6] = (int)(float)lVar19;
        *piVar18 = iVar10;
        piVar18[4] = (int)param_3;
        piVar18[3] = (int)&local_a0;
        piVar18[2] = (int)&local_70;
        piVar18[1] = iVar11;
        piVar18[-1] = 0x3e5993;
        bVar7 = NavAreaBuildPath<IPathCost_const>
                          ((CNavArea *)*piVar18,(CNavArea *)piVar18[1],(Vector *)piVar18[2],
                           (Vector *)piVar18[3],(IPathCost *)piVar18[4],(CNavArea **)piVar18[5],
                           (float)piVar18[6],piVar18[7],SUB41(piVar18[8],0));
        if (local_d8 == 0) goto LAB_003e5ae8;
        if (iVar10 == local_d8) {
LAB_003e6e99:
          piVar18[1] = (int)param_1;
          *piVar18 = (int)this;
          piVar18[2] = (int)&local_a0;
                    /* try { // try from 003e6eaa to 003e6eae has its CatchHandler @ 003e70bd */
          piVar18[-1] = 0x3e6eaf;
          Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
        }
        else {
          local_e0 = 1;
          iVar11 = local_d8;
          do {
            iVar11 = *(int *)(iVar11 + 0x78);
            if (iVar11 == 0) break;
            local_e0 = local_e0 + 1;
          } while (iVar10 != iVar11);
          if (local_e0 < 0x100) {
            if (local_e0 == 1) goto LAB_003e6e99;
            *(int *)(this + 0x4404) = local_e0;
          }
          else {
            *(undefined4 *)(this + 0x4404) = 0xff;
            local_e0 = 0xff;
          }
          iVar10 = local_d8;
          iVar11 = local_e0;
          pCVar17 = this + (local_e0 + -1) * 0x44 + 4;
          do {
            *(int *)pCVar17 = iVar10;
            iVar11 = iVar11 + -1;
            bVar3 = *(byte *)(iVar10 + 0x7c);
            *(int *)(pCVar17 + 0x18) = 0;
            *(uint *)(pCVar17 + 4) = bVar3 & 0xf;
            iVar10 = *(int *)(iVar10 + 0x78);
            if (iVar10 == 0) break;
            pCVar17 = pCVar17 + -0x44;
          } while (iVar11 != 0);
          *(int *)(this + local_e0 * 0x44 + 0xc) = local_7c;
          *(int *)(this + local_e0 * 0x44 + 0x10) = local_78;
          *(int *)(this + local_e0 * 0x44 + 4) = local_d8;
          *(float *)(this + local_e0 * 0x44 + 0x14) = local_74;
          iVar10 = *(int *)(this + 0x4404);
          *(undefined4 *)(this + iVar10 * 0x44 + 0x18) = 0;
          *(undefined4 *)(this + iVar10 * 0x44 + 8) = 9;
          *(undefined4 *)(this + iVar10 * 0x44 + 0x1c) = 0;
          *(int *)(this + 0x4404) = iVar10 + 1;
          piVar18[1] = (int)param_1;
          *piVar18 = (int)this;
          piVar18[2] = iVar9;
          piVar18[-1] = 0x3e5ac4;
          cVar6 = Path::ComputePathDetails
                            ((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
          if (cVar6 == '\0') {
            iVar10 = *(int *)this;
            *piVar18 = (int)this;
            pcVar5 = *(code **)(iVar10 + 0x48);
            piVar18[-1] = 0x3e5ad4;
            (*pcVar5)();
            goto LAB_003e5ad4;
          }
          piVar18[1] = (int)param_1;
          *piVar18 = (int)this;
                    /* try { // try from 003e68c7 to 003e68f0 has its CatchHandler @ 003e70bd */
          piVar18[-1] = 0x3e68cc;
          Path::Optimize((INextBot *)*piVar18);
          *piVar18 = (int)this;
          piVar18[-1] = 0x3e68d4;
          Path::PostProcess((Path *)*piVar18);
          iVar10 = *(int *)this;
          piVar18[1] = (int)param_1;
          *piVar18 = (int)this;
          piVar18[2] = (uint)!bVar7;
          pcVar5 = *(code **)(iVar10 + 100);
          piVar18[-1] = 0x3e68f1;
          (*pcVar5)();
        }
      }
    }
    iVar10 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      piVar18[-1] = 0x3e66c8;
      iVar9 = ThreadGetCurrentId();
      if (iVar10 == iVar9) {
        *piVar18 = (int)_DAT_0105d15c;
        piVar18[-1] = 0x3e66e1;
        cVar6 = CVProfNode::ExitScope();
        if (cVar6 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_80 != 0) {
      piVar18[5] = 0;
      piVar18[4] = 0;
      piVar18[3] = 0;
      *piVar18 = local_80;
      piVar18[1] = local_88;
      piVar18[2] = local_84;
      pcVar5 = *(code **)(local_80 + 0x54);
      piVar18[-1] = 0x3e5b3a;
      (*pcVar5)();
    }
    if (bVar7 == false) goto LAB_003e6078;
  }
  else {
LAB_003e6078:
    iVar10 = *(int *)param_2;
    *piVar18 = (int)param_2;
    pcVar5 = *(code **)(iVar10 + 0x144);
    piVar18[-1] = 0x3e6089;
    iVar9 = (*pcVar5)();
    iVar10 = *(int *)this;
    *piVar18 = (int)this;
    if (iVar9 == 0) {
                    /* try { // try from 003e6a77 to 003e6b03 has its CatchHandler @ 003e7102 */
      pcVar5 = *(code **)(iVar10 + 0x8c);
      piVar18[-1] = 0x3e6a7d;
      lVar19 = (longdouble)(*pcVar5)();
      local_b4 = 0;
      local_b0 = 0;
      if (_towlower == 0) {
        local_38 = 0;
      }
      else {
        piVar18[0xb] = (int)"Path::Compute(goal)";
        piVar18[10] = (int)"NextBotSpiky";
        piVar18[9] = (int)"(%s)%s";
        piVar18[8] = (int)&Path::
                           Compute<IPathCost_const>(INextBot*,Vector_const&,IPathCost_const&,float)
                           ::tm_fmt;
        piVar18[7] = 0x113;
        piVar18[6] = (int)"/data/src/game/server/nextbot/path/nextbotpath.h";
        piVar18[5] = 0;
        piVar18[3] = 0;
        piVar18[4] = 0;
        piVar18[2] = 0;
        piVar18[1] = (int)&local_b4;
        *piVar18 = _towlower;
        pcVar5 = *(code **)(_towlower + 0x50);
        piVar18[-1] = 0x3e6b04;
        (*pcVar5)();
        local_38 = _towlower;
      }
      iVar10 = _DAT_0105db00;
      local_40 = local_b4;
      local_3c = local_b0;
      if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 003e6b37 to 003e6b3b has its CatchHandler @ 003e70b9 */
        piVar18[-1] = 0x3e6b3c;
        iVar9 = ThreadGetCurrentId();
        if (iVar10 == iVar9) {
          if ((char *)*_DAT_0105d15c != "Path::Compute(goal)") {
            piVar18[4] = 4;
            piVar18[3] = (int)"NextBotSpiky";
            piVar18[2] = 0;
            piVar18[1] = (int)"Path::Compute(goal)";
            *piVar18 = (int)_DAT_0105d15c;
                    /* try { // try from 003e6fe9 to 003e700c has its CatchHandler @ 003e70b9 */
            piVar18[-1] = 0x3e6fee;
            _DAT_0105d15c =
                 (int *)CVProfNode::GetSubNode
                                  ((char *)*piVar18,piVar18[1],(char *)piVar18[2],piVar18[3]);
          }
          puVar2 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
          *puVar2 = *puVar2 | 4;
          *piVar18 = (int)_DAT_0105d15c;
          piVar18[-1] = 0x3e700d;
          CVProfNode::EnterScope();
          DAT_0105d158 = '\0';
        }
      }
      iVar10 = *(int *)this;
      *piVar18 = (int)this;
                    /* try { // try from 003e6b49 to 003e6e2f has its CatchHandler @ 003e707e */
      pcVar5 = *(code **)(iVar10 + 0x48);
      piVar18[-1] = 0x3e6b4c;
      (*pcVar5)();
      iVar10 = *(int *)param_1;
      *piVar18 = (int)param_1;
      pcVar5 = *(code **)(iVar10 + 0xd4);
      piVar18[-1] = 0x3e6b57;
      iVar9 = (*pcVar5)();
      iVar10 = *(int *)param_1;
      *piVar18 = (int)param_1;
      pcVar5 = *(code **)(iVar10 + 0xb4);
      piVar18[-1] = 0x3e6b68;
      piVar8 = (int *)(*pcVar5)();
      iVar10 = *piVar8;
      *piVar18 = (int)piVar8;
      pcVar5 = *(code **)(iVar10 + 0x52c);
      piVar18[-1] = 0x3e6b73;
      iVar10 = (*pcVar5)();
      if (iVar10 == 0) {
LAB_003e6e1c:
        iVar10 = *(int *)this;
        piVar18[2] = 2;
        piVar18[1] = (int)param_1;
        *piVar18 = (int)this;
        pcVar5 = *(code **)(iVar10 + 100);
        piVar18[-1] = 0x3e6e30;
        (*pcVar5)();
LAB_003e6e30:
        bVar7 = false;
      }
      else {
        piVar18[6] = 0;
        piVar18[1] = (int)&local_a0;
        piVar18[5] = 1;
        piVar18[4] = 1;
        piVar18[3] = 0x43480000;
        piVar18[2] = 1;
        *piVar18 = TheNavMesh;
        piVar18[-1] = 0x3e6bc2;
        iVar11 = CNavMesh::GetNearestNavArea
                           ((CNavMesh *)*piVar18,(Vector *)piVar18[1],SUB41(piVar18[2],0),
                            (float)piVar18[3],SUB41(piVar18[4],0),SUB41(piVar18[5],0),
                            SUB41(piVar18[6],0));
        if (iVar10 == iVar11) {
          piVar18[1] = (int)param_1;
          *piVar18 = (int)this;
          piVar18[2] = (int)&local_a0;
          piVar18[-1] = 0x3e7057;
          Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
          bVar7 = true;
        }
        else {
          local_34 = local_a0;
          local_30 = local_9c;
          local_2c = local_98;
          if (iVar11 == 0) {
            piVar18[3] = 0;
            piVar18[1] = (int)&local_34;
            piVar18[2] = (int)&local_2c;
            *piVar18 = TheNavMesh;
                    /* try { // try from 003e7037 to 003e7078 has its CatchHandler @ 003e707e */
            piVar18[-1] = 0x3e703c;
            CNavMesh::GetGroundHeight
                      ((CNavMesh *)*piVar18,(Vector *)piVar18[1],(float *)piVar18[2],
                       (Vector *)piVar18[3]);
          }
          else {
            *piVar18 = iVar11;
            piVar18[2] = local_9c;
            piVar18[1] = local_a0;
            piVar18[-1] = 0x3e6c17;
            lVar20 = (longdouble)
                     CNavArea::GetZ((CNavArea *)*piVar18,(float)piVar18[1],(float)piVar18[2]);
            local_2c = (float)lVar20;
          }
          iVar12 = *(int *)param_1;
          *piVar18 = (int)param_1;
          pcVar5 = *(code **)(iVar12 + 0xb4);
          piVar18[-1] = 0x3e6c35;
          iVar12 = (*pcVar5)();
          if ((*(byte *)(iVar12 + 0x14d) & 8) != 0) {
            *piVar18 = iVar12;
            piVar18[-1] = 0x3e6c52;
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar18);
          }
          local_d0 = 0;
          local_28 = *(undefined4 *)(iVar12 + 0x2e0);
          local_24 = *(undefined4 *)(iVar12 + 0x2e4);
          local_20 = *(float *)(iVar12 + 0x2e8);
          iVar12 = *(int *)param_1;
          *piVar18 = (int)param_1;
          pcVar5 = *(code **)(iVar12 + 0xb4);
          piVar18[-1] = 0x3e6c88;
          uVar13 = (*pcVar5)();
          *piVar18 = uVar13;
          piVar18[-1] = 0x3e6c90;
          iVar12 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar18);
          piVar18[7] = iVar12;
          piVar18[5] = (int)&local_d0;
          piVar18[8] = 0;
          piVar18[6] = (int)(float)lVar19;
          *piVar18 = iVar10;
          piVar18[4] = (int)param_3;
          piVar18[3] = (int)&local_a0;
          piVar18[2] = (int)&local_28;
          piVar18[1] = iVar11;
          piVar18[-1] = 0x3e6cde;
          bVar7 = NavAreaBuildPath<IPathCost_const>
                            ((CNavArea *)*piVar18,(CNavArea *)piVar18[1],(Vector *)piVar18[2],
                             (Vector *)piVar18[3],(IPathCost *)piVar18[4],(CNavArea **)piVar18[5],
                             (float)piVar18[6],piVar18[7],SUB41(piVar18[8],0));
          if (local_d0 == 0) goto LAB_003e6e30;
          if (iVar10 == local_d0) {
LAB_003e7063:
            piVar18[1] = (int)param_1;
            *piVar18 = (int)this;
            piVar18[2] = (int)&local_a0;
            piVar18[-1] = 0x3e7079;
            Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
          }
          else {
            local_e0 = 1;
            iVar11 = local_d0;
            do {
              iVar11 = *(int *)(iVar11 + 0x78);
              if (iVar11 == 0) break;
              local_e0 = local_e0 + 1;
            } while (iVar10 != iVar11);
            if (local_e0 < 0x100) {
              if (local_e0 == 1) goto LAB_003e7063;
              *(int *)(this + 0x4404) = local_e0;
            }
            else {
              *(undefined4 *)(this + 0x4404) = 0xff;
              local_e0 = 0xff;
            }
            iVar10 = local_d0;
            iVar11 = local_e0;
            pCVar17 = this + (local_e0 + -1) * 0x44 + 4;
            do {
              *(int *)pCVar17 = iVar10;
              iVar11 = iVar11 + -1;
              bVar3 = *(byte *)(iVar10 + 0x7c);
              *(int *)(pCVar17 + 0x18) = 0;
              *(uint *)(pCVar17 + 4) = bVar3 & 0xf;
              iVar10 = *(int *)(iVar10 + 0x78);
              if (iVar10 == 0) break;
              pCVar17 = pCVar17 + -0x44;
            } while (iVar11 != 0);
            *(int *)(this + local_e0 * 0x44 + 0xc) = local_34;
            *(int *)(this + local_e0 * 0x44 + 0x10) = local_30;
            *(int *)(this + local_e0 * 0x44 + 4) = local_d0;
            *(float *)(this + local_e0 * 0x44 + 0x14) = local_2c;
            iVar10 = *(int *)(this + 0x4404);
            *(undefined4 *)(this + iVar10 * 0x44 + 0x18) = 0;
            *(undefined4 *)(this + iVar10 * 0x44 + 8) = 9;
            *(undefined4 *)(this + iVar10 * 0x44 + 0x1c) = 0;
            *(int *)(this + 0x4404) = iVar10 + 1;
            piVar18[1] = (int)param_1;
            *piVar18 = (int)this;
            piVar18[2] = iVar9;
            piVar18[-1] = 0x3e6e0c;
            cVar6 = Path::ComputePathDetails
                              ((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
            if (cVar6 == '\0') {
              iVar10 = *(int *)this;
              *piVar18 = (int)this;
              pcVar5 = *(code **)(iVar10 + 0x48);
              piVar18[-1] = 0x3e6e1c;
              (*pcVar5)();
              goto LAB_003e6e1c;
            }
            piVar18[1] = (int)param_1;
            *piVar18 = (int)this;
                    /* try { // try from 003e6f5b to 003e6f84 has its CatchHandler @ 003e707e */
            piVar18[-1] = 0x3e6f60;
            Path::Optimize((INextBot *)*piVar18);
            *piVar18 = (int)this;
            piVar18[-1] = 0x3e6f68;
            Path::PostProcess((Path *)*piVar18);
            iVar10 = *(int *)this;
            piVar18[1] = (int)param_1;
            *piVar18 = (int)this;
            piVar18[2] = (uint)!bVar7;
            pcVar5 = *(code **)(iVar10 + 100);
            piVar18[-1] = 0x3e6f85;
            (*pcVar5)();
          }
        }
      }
      iVar10 = _DAT_0105db00;
      if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
        piVar18[-1] = 0x3e6e55;
        iVar9 = ThreadGetCurrentId();
        if (iVar10 == iVar9) {
          *piVar18 = (int)_DAT_0105d15c;
          piVar18[-1] = 0x3e6f97;
          cVar6 = CVProfNode::ExitScope();
          if (cVar6 != '\0') {
            _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
          }
          DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
        }
      }
      if (local_38 != 0) {
        piVar18[5] = 0;
        piVar18[4] = 0;
        piVar18[3] = 0;
        *piVar18 = local_38;
        piVar18[1] = local_40;
        piVar18[2] = local_3c;
        pcVar5 = *(code **)(local_38 + 0x54);
        piVar18[-1] = 0x3e6e94;
        (*pcVar5)();
      }
    }
    else {
      pcVar5 = *(code **)(iVar10 + 0x8c);
      piVar18[-1] = 0x3e609c;
      lVar19 = (longdouble)(*pcVar5)();
      iVar10 = *(int *)param_2;
      *piVar18 = (int)param_2;
      pcVar5 = *(code **)(iVar10 + 0x144);
      piVar18[-1] = 0x3e60b3;
      piVar8 = (int *)(*pcVar5)();
      local_bc = 0;
      local_b8 = 0;
      if (_towlower == 0) {
        local_5c = 0;
      }
      else {
        piVar18[0xb] = (int)"Path::Compute(subject)";
        piVar18[10] = (int)"NextBot";
        piVar18[9] = (int)"(%s)%s";
        piVar18[8] = (int)&Path::
                           Compute<IPathCost_const>(INextBot*,CBaseCombatCharacter*,IPathCost_const&,float)
                           ::tm_fmt;
        piVar18[7] = 0x9c;
        piVar18[6] = (int)"/data/src/game/server/nextbot/path/nextbotpath.h";
        piVar18[5] = 0;
        piVar18[3] = 0;
        piVar18[4] = 0;
        piVar18[2] = 0;
        piVar18[1] = (int)&local_bc;
        *piVar18 = _towlower;
        pcVar5 = *(code **)(_towlower + 0x50);
        piVar18[-1] = 0x3e6136;
        (*pcVar5)();
        local_5c = _towlower;
      }
      iVar10 = _DAT_0105db00;
      local_64 = local_bc;
      local_60 = local_b8;
      if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 003e616e to 003e6172 has its CatchHandler @ 003e70fa */
        piVar18[-1] = 0x3e6173;
        iVar9 = ThreadGetCurrentId();
        if (iVar10 == iVar9) {
          if ((char *)*_DAT_0105d15c != "Path::Compute(subject)") {
            piVar18[4] = 4;
            piVar18[3] = (int)"NextBot";
            piVar18[2] = 0;
            piVar18[1] = (int)"Path::Compute(subject)";
            *piVar18 = (int)_DAT_0105d15c;
                    /* try { // try from 003e6a18 to 003e6a3b has its CatchHandler @ 003e70fa */
            piVar18[-1] = 0x3e6a1d;
            _DAT_0105d15c =
                 (int *)CVProfNode::GetSubNode
                                  ((char *)*piVar18,piVar18[1],(char *)piVar18[2],piVar18[3]);
          }
          puVar2 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
          *puVar2 = *puVar2 | 4;
          *piVar18 = (int)_DAT_0105d15c;
          piVar18[-1] = 0x3e6a3c;
          CVProfNode::EnterScope();
          DAT_0105d158 = '\0';
        }
      }
      iVar10 = *(int *)this;
      *piVar18 = (int)this;
                    /* try { // try from 003e6184 to 003e641f has its CatchHandler @ 003e70df */
      pcVar5 = *(code **)(iVar10 + 0x48);
      piVar18[-1] = 0x3e6187;
      (*pcVar5)();
      if (piVar8 == (int *)0x0) {
        *(undefined4 *)(this + 0x4450) = 0xffffffff;
      }
      else {
        iVar10 = *piVar8;
        *piVar18 = (int)piVar8;
        pcVar5 = *(code **)(iVar10 + 0xc);
        piVar18[-1] = 0x3e6197;
        puVar14 = (undefined4 *)(*pcVar5)();
        *(undefined4 *)(this + 0x4450) = *puVar14;
      }
      iVar10 = *(int *)param_1;
      *piVar18 = (int)param_1;
      pcVar5 = *(code **)(iVar10 + 0xd4);
      piVar18[-1] = 0x3e61aa;
      iVar9 = (*pcVar5)();
      iVar10 = *(int *)param_1;
      *piVar18 = (int)param_1;
      pcVar5 = *(code **)(iVar10 + 0xb4);
      piVar18[-1] = 0x3e61bb;
      piVar15 = (int *)(*pcVar5)();
      iVar10 = *piVar15;
      *piVar18 = (int)piVar15;
      pcVar5 = *(code **)(iVar10 + 0x52c);
      piVar18[-1] = 0x3e61c6;
      iVar10 = (*pcVar5)();
      if (iVar10 == 0) {
LAB_003e640c:
        iVar10 = *(int *)this;
        piVar18[2] = 2;
        piVar18[1] = (int)param_1;
        *piVar18 = (int)this;
        pcVar5 = *(code **)(iVar10 + 100);
        piVar18[-1] = 0x3e6420;
        (*pcVar5)();
LAB_003e6420:
        bVar7 = false;
      }
      else {
        iVar11 = *piVar8;
        *piVar18 = (int)piVar8;
        pcVar5 = *(code **)(iVar11 + 0x52c);
        piVar18[-1] = 0x3e61df;
        iVar11 = (*pcVar5)();
        if (iVar11 == 0) goto LAB_003e640c;
        if ((*(byte *)((int)piVar8 + 0x14d) & 8) != 0) {
          *piVar18 = (int)piVar8;
          piVar18[-1] = 0x3e69e3;
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar18);
        }
        local_58 = piVar8[0xb8];
        local_54 = piVar8[0xb9];
        local_50 = piVar8[0xba];
        if (iVar10 != iVar11) {
          iVar12 = *(int *)param_1;
          *piVar18 = (int)param_1;
          pcVar5 = *(code **)(iVar12 + 0xb4);
          piVar18[-1] = 0x3e6232;
          iVar12 = (*pcVar5)();
          if ((*(byte *)(iVar12 + 0x14d) & 8) != 0) {
            *piVar18 = iVar12;
            piVar18[-1] = 0x3e6245;
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar18);
          }
          local_d4 = 0;
          local_4c = *(undefined4 *)(iVar12 + 0x2e0);
          local_48 = *(undefined4 *)(iVar12 + 0x2e4);
          local_44 = *(undefined4 *)(iVar12 + 0x2e8);
          iVar12 = *(int *)param_1;
          *piVar18 = (int)param_1;
          pcVar5 = *(code **)(iVar12 + 0xb4);
          piVar18[-1] = 0x3e6275;
          uVar13 = (*pcVar5)();
          *piVar18 = uVar13;
          piVar18[-1] = 0x3e627d;
          iVar12 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar18);
          piVar18[7] = iVar12;
          piVar18[8] = 0;
          piVar18[5] = (int)&local_d4;
          piVar18[6] = (int)(float)lVar19;
          piVar18[3] = (int)&local_58;
          piVar18[4] = (int)param_3;
          piVar18[2] = (int)&local_4c;
          piVar18[1] = iVar11;
          *piVar18 = iVar10;
          piVar18[-1] = 0x3e62ce;
          bVar7 = NavAreaBuildPath<IPathCost_const>
                            ((CNavArea *)*piVar18,(CNavArea *)piVar18[1],(Vector *)piVar18[2],
                             (Vector *)piVar18[3],(IPathCost *)piVar18[4],(CNavArea **)piVar18[5],
                             (float)piVar18[6],piVar18[7],SUB41(piVar18[8],0));
          if (local_d4 != 0) {
            if (iVar10 == local_d4) {
LAB_003e6f1b:
              piVar18[2] = (int)&local_58;
              piVar18[1] = (int)param_1;
              *piVar18 = (int)this;
                    /* try { // try from 003e6f26 to 003e6f2a has its CatchHandler @ 003e70df */
              piVar18[-1] = 0x3e6f2b;
              Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
            }
            else {
              local_e0 = 1;
              iVar11 = local_d4;
              do {
                iVar11 = *(int *)(iVar11 + 0x78);
                if (iVar11 == 0) break;
                local_e0 = local_e0 + 1;
              } while (iVar10 != iVar11);
              if (local_e0 < 0x100) {
                if (local_e0 == 1) goto LAB_003e6f1b;
                *(int *)(this + 0x4404) = local_e0;
              }
              else {
                *(undefined4 *)(this + 0x4404) = 0xff;
                local_e0 = 0xff;
              }
              iVar10 = local_d4;
              iVar11 = local_e0;
              pCVar17 = this + (local_e0 + -1) * 0x44 + 4;
              do {
                *(int *)pCVar17 = iVar10;
                iVar11 = iVar11 + -1;
                bVar3 = *(byte *)(iVar10 + 0x7c);
                *(int *)(pCVar17 + 0x18) = 0;
                *(uint *)(pCVar17 + 4) = bVar3 & 0xf;
                iVar10 = *(int *)(iVar10 + 0x78);
                if (iVar10 == 0) break;
                pCVar17 = pCVar17 + -0x44;
              } while (iVar11 != 0);
              *(int *)(this + local_e0 * 0x44 + 0xc) = local_58;
              *(int *)(this + local_e0 * 0x44 + 0x10) = local_54;
              *(int *)(this + local_e0 * 0x44 + 4) = local_d4;
              *(int *)(this + local_e0 * 0x44 + 0x14) = local_50;
              iVar10 = *(int *)(this + 0x4404);
              *(undefined4 *)(this + iVar10 * 0x44 + 0x18) = 0;
              *(undefined4 *)(this + iVar10 * 0x44 + 8) = 9;
              *(undefined4 *)(this + iVar10 * 0x44 + 0x1c) = 0;
              *(int *)(this + 0x4404) = iVar10 + 1;
              piVar18[1] = (int)param_1;
              *piVar18 = (int)this;
              piVar18[2] = iVar9;
              piVar18[-1] = 0x3e63fc;
              cVar6 = Path::ComputePathDetails
                                ((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
              if (cVar6 == '\0') {
                iVar10 = *(int *)this;
                *piVar18 = (int)this;
                pcVar5 = *(code **)(iVar10 + 0x48);
                piVar18[-1] = 0x3e640c;
                (*pcVar5)();
                goto LAB_003e640c;
              }
              piVar18[1] = (int)param_1;
              *piVar18 = (int)this;
                    /* try { // try from 003e69ac to 003e69e2 has its CatchHandler @ 003e70df */
              piVar18[-1] = 0x3e69b1;
              Path::Optimize((INextBot *)*piVar18);
              *piVar18 = (int)this;
              piVar18[-1] = 0x3e69b9;
              Path::PostProcess((Path *)*piVar18);
              iVar10 = *(int *)this;
              piVar18[1] = (int)param_1;
              *piVar18 = (int)this;
              piVar18[2] = (uint)!bVar7;
              pcVar5 = *(code **)(iVar10 + 100);
              piVar18[-1] = 0x3e69d6;
              (*pcVar5)();
            }
            goto LAB_003e6427;
          }
          goto LAB_003e6420;
        }
        piVar18[1] = (int)param_1;
        piVar18[2] = (int)&local_58;
        *piVar18 = (int)this;
                    /* try { // try from 003e6eea to 003e6eee has its CatchHandler @ 003e70df */
        piVar18[-1] = 0x3e6eef;
        Path::BuildTrivialPath((Path *)*piVar18,(INextBot *)piVar18[1],(Vector *)piVar18[2]);
        bVar7 = true;
      }
LAB_003e6427:
      iVar10 = _DAT_0105db00;
      if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
        piVar18[-1] = 0x3e6444;
        iVar9 = ThreadGetCurrentId();
        if (iVar10 == iVar9) {
          *piVar18 = (int)_DAT_0105d15c;
          piVar18[-1] = 0x3e6a55;
          cVar6 = CVProfNode::ExitScope();
          if (cVar6 != '\0') {
            _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
          }
          DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
        }
      }
      if (local_5c != 0) {
        piVar18[5] = 0;
        piVar18[4] = 0;
        piVar18[3] = 0;
        *piVar18 = local_5c;
        piVar18[1] = local_64;
        piVar18[2] = local_60;
        pcVar5 = *(code **)(local_5c + 0x54);
        piVar18[-1] = 0x3e647f;
        (*pcVar5)();
      }
    }
    if (bVar7 == false) {
      iVar10 = *(int *)param_1;
      *piVar18 = (int)param_1;
      piVar18[1] = (int)param_2;
                    /* try { // try from 003e6498 to 003e66a5 has its CatchHandler @ 003e7102 */
      pcVar5 = *(code **)(iVar10 + 0x124);
      piVar18[-1] = 0x3e649e;
      lVar19 = (longdouble)(*pcVar5)();
      fVar21 = (float)lVar19 * 0.005;
      *piVar18 = (int)pCVar1;
      piVar18[-1] = 0x3e64ca;
      lVar19 = (longdouble)CountdownTimer::Now();
      if ((float)lVar19 + fVar21 != *(float *)(this + 0x47e8)) {
        iVar10 = *(int *)(this + 0x47e0);
        piVar18[1] = (int)(this + 0x47e8);
        *piVar18 = (int)pCVar1;
        pcVar5 = *(code **)(iVar10 + 4);
        piVar18[-1] = 0x3e694a;
        (*pcVar5)();
        *(float *)(this + 0x47e8) = (float)lVar19 + fVar21;
      }
      if (fVar21 != *(float *)(this + 0x47e4)) {
        iVar10 = *(int *)(this + 0x47e0);
        piVar18[1] = (int)(this + 0x47e4);
        *piVar18 = (int)pCVar1;
                    /* try { // try from 003e6916 to 003e6949 has its CatchHandler @ 003e7102 */
        pcVar5 = *(code **)(iVar10 + 4);
        piVar18[-1] = 0x3e6919;
        (*pcVar5)();
        *(float *)(this + 0x47e4) = fVar21;
      }
      iVar10 = *(int *)this;
      *piVar18 = (int)this;
      pcVar5 = *(code **)(iVar10 + 0x1c);
      piVar18[-1] = 0x3e6510;
      iVar9 = (*pcVar5)();
      iVar10 = *(int *)this;
      *piVar18 = (int)this;
      piVar18[1] = (int)param_2;
      pcVar5 = *(code **)(iVar10 + 0x20);
      piVar18[-1] = 0x3e6521;
      (*pcVar5)();
      iVar10 = *(int *)param_1;
      piVar18[2] = 0;
      piVar18[1] = (int)this;
      *piVar18 = (int)param_1;
      pcVar5 = *(code **)(iVar10 + 0x24);
      piVar18[-1] = 0x3e6535;
      (*pcVar5)();
      iVar10 = *(int *)this;
      piVar18[1] = iVar9;
      *piVar18 = (int)this;
      pcVar5 = *(code **)(iVar10 + 0x20);
      piVar18[-1] = 0x3e6541;
      (*pcVar5)();
      piVar18[1] = 4;
      *piVar18 = (int)param_1;
      piVar18[-1] = 0x3e6551;
      cVar6 = INextBot::IsDebugging((INextBot *)*piVar18,piVar18[1]);
      if (cVar6 != '\0') {
        piVar18[1] = 100;
        *piVar18 = 0;
        piVar18[-1] = 0x3e656d;
        iVar9 = RandomInt();
        iVar10 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar10 + 0xd4);
        piVar18[-1] = 0x3e657a;
        iVar11 = (*pcVar5)();
        iVar10 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar10 + 0xd4);
        piVar18[-1] = 0x3e658b;
        puVar14 = (undefined4 *)(*pcVar5)();
        local_28 = *puVar14;
        local_24 = puVar14[1];
        local_20 = (float)puVar14[2];
        piVar18[8] = 0x42b40000;
        piVar18[7] = 1;
        local_20 = local_20 + 20.0;
        piVar18[6] = 0xff;
        piVar18[5] = iVar9;
        piVar18[4] = iVar9;
        piVar18[1] = iVar11;
        piVar18[3] = 0xff;
        piVar18[2] = 0x41a00000;
        *piVar18 = (int)&local_28;
        piVar18[-1] = 0x3e65f7;
        NDebugOverlay::VertArrow
                  ((Vector *)*piVar18,(Vector *)piVar18[1],(float)piVar18[2],piVar18[3],piVar18[4],
                   piVar18[5],piVar18[6],SUB41(piVar18[7],0),(float)piVar18[8]);
        iVar10 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar10 + 0xd4);
        piVar18[-1] = 0x3e6602;
        uVar13 = (*pcVar5)();
        piVar18[8] = 0x42b40000;
        piVar18[7] = 1;
        piVar18[6] = 0xff;
        piVar18[5] = iVar9;
        piVar18[4] = iVar9;
        piVar18[3] = 0xff;
        piVar18[2] = 0x40a00000;
        piVar18[1] = (int)&local_a0;
        *piVar18 = uVar13;
        piVar18[-1] = 0x3e6644;
        NDebugOverlay::HorzArrow
                  ((Vector *)*piVar18,(Vector *)piVar18[1],(float)piVar18[2],piVar18[3],piVar18[4],
                   piVar18[5],piVar18[6],SUB41(piVar18[7],0),(float)piVar18[8]);
        iVar10 = *(int *)param_1;
        *piVar18 = (int)param_1;
        pcVar5 = *(code **)(iVar10 + 0xb4);
        piVar18[-1] = 0x3e664f;
        iVar9 = (*pcVar5)();
        iVar10 = 0;
        if (*(int *)(iVar9 + 0x30) != 0) {
          iVar10 = *(int *)(iVar9 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
        }
        piVar18[3] = iVar10;
        fVar21 = *(float *)(gpGlobals + 0xc);
        *piVar18 = (int)"%3.2f: bot(#%d) REPATH FAILED\n";
        *(double *)(piVar18 + 1) = (double)fVar21;
        piVar18[-1] = 0x3e6680;
        DevMsg((char *)*piVar18);
      }
      iVar10 = *(int *)this;
      *piVar18 = (int)this;
      pcVar5 = *(code **)(iVar10 + 0x48);
      piVar18[-1] = 0x3e6688;
      (*pcVar5)();
      piVar8 = piVar18;
      goto LAB_003e5c20;
    }
  }
  iVar10 = *(int *)param_2;
  *piVar18 = (int)param_2;
                    /* try { // try from 003e5b4f to 003e5bd9 has its CatchHandler @ 003e7102 */
  pcVar5 = *(code **)(iVar10 + 0xc);
  piVar18[-1] = 0x3e5b52;
  puVar14 = (undefined4 *)(*pcVar5)();
  pCVar1 = this + 0x47ec;
  *(undefined4 *)(this + 0x4804) = *puVar14;
  *piVar18 = (int)pCVar1;
  piVar18[-1] = 0x3e5b68;
  lVar19 = (longdouble)CountdownTimer::Now();
  if ((float)lVar19 + 0.5 != *(float *)(this + 0x47f4)) {
    iVar10 = *(int *)(this + 0x47ec);
    *piVar18 = (int)pCVar1;
    piVar18[1] = (int)(this + 0x47f4);
                    /* try { // try from 003e68a7 to 003e68a9 has its CatchHandler @ 003e7102 */
    pcVar5 = *(code **)(iVar10 + 4);
    piVar18[-1] = 0x3e68aa;
    (*pcVar5)();
    *(float *)(this + 0x47f4) = (float)lVar19 + 0.5;
  }
  if (*(float *)(this + 0x47f0) != 0.5) {
    iVar10 = *(int *)(this + 0x47ec);
    *piVar18 = (int)pCVar1;
    piVar18[1] = (int)(this + 0x47f0);
    pcVar5 = *(code **)(iVar10 + 4);
    piVar18[-1] = 0x3e6856;
    (*pcVar5)();
    *(undefined4 *)(this + 0x47f0) = 0x3f000000;
  }
  iVar10 = *(int *)this;
  *piVar18 = (int)this;
  pcVar5 = *(code **)(iVar10 + 0x98);
  piVar18[-1] = 0x3e5bb1;
  lVar19 = (longdouble)(*pcVar5)();
  fVar21 = (float)lVar19;
  piVar8 = piVar18;
  if (fVar21 <= 0.0) {
    if (*(float *)(this + 0x4800) != -1.0) {
      iVar10 = *(int *)(this + 0x47f8);
      *piVar18 = (int)(this + 0x47f8);
      piVar18[1] = (int)(this + 0x4800);
                    /* try { // try from 003e6736 to 003e678b has its CatchHandler @ 003e7102 */
      pcVar5 = *(code **)(iVar10 + 4);
      piVar18[-1] = 0x3e6739;
      (*pcVar5)();
      *(undefined4 *)(this + 0x4800) = 0xbf800000;
    }
  }
  else {
    pCVar1 = this + 0x47f8;
    *piVar18 = (int)pCVar1;
    piVar18[-1] = 0x3e5bda;
    lVar19 = (longdouble)CountdownTimer::Now();
    if ((float)lVar19 + fVar21 != *(float *)(this + 0x4800)) {
      iVar10 = *(int *)(this + 0x47f8);
      *piVar18 = (int)pCVar1;
      piVar18[1] = (int)(this + 0x4800);
      pcVar5 = *(code **)(iVar10 + 4);
      piVar18[-1] = 0x3e680e;
      (*pcVar5)();
      *(float *)(this + 0x4800) = (float)lVar19 + fVar21;
    }
    if (fVar21 != *(float *)(this + 0x47fc)) {
      iVar10 = *(int *)(this + 0x47f8);
      *piVar18 = (int)pCVar1;
      piVar18[1] = (int)(this + 0x47fc);
      pcVar5 = *(code **)(iVar10 + 4);
      piVar18[-1] = 0x3e67e3;
      (*pcVar5)();
      *(float *)(this + 0x47fc) = fVar21;
    }
  }
LAB_003e5c20:
  iVar10 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    piVar8[-1] = 0x3e5c3e;
    iVar9 = ThreadGetCurrentId();
    if (iVar10 == iVar9) {
      *piVar8 = (int)_DAT_0105d15c;
      piVar8[-1] = 0x3e6872;
      cVar6 = CVProfNode::ExitScope();
      if (cVar6 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_a4 == 0) {
    return;
  }
  piVar8[5] = 0;
  piVar8[4] = 0;
  piVar8[3] = 0;
  *piVar8 = local_a4;
  piVar8[1] = local_ac;
  piVar8[2] = local_a8;
  pcVar5 = *(code **)(local_a4 + 0x54);
  piVar8[-1] = 0x3e5c86;
  (*pcVar5)();
  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)