L L4D2node

ZombieReplacement::Restore

0x009e5cc0 · 4638 bytes · __thiscall

_ZN17ZombieReplacement7RestoreEP13CTerrorPlayerS1_

Decompiled

undefined (3 params)

/* ZombieReplacement::Restore(CTerrorPlayer*, CTerrorPlayer*) */

void __thiscall
ZombieReplacement::Restore(ZombieReplacement *this,CTerrorPlayer *param_1,CTerrorPlayer *param_2)

{
  float fVar1;
  ZombieReplacement ZVar2;
  uint uVar3;
  CBaseEdict *pCVar4;
  int *piVar5;
  CTerrorPlayer *pCVar6;
  int iVar7;
  uint *puVar8;
  undefined *puVar9;
  undefined *puVar10;
  int iVar11;
  longdouble lVar12;
  CTerrorPlayer *local_30;
  uint local_20 [4];
  
  (**(code **)(*(int *)param_2 + 0x8cc))(param_2,3,8,1);
  if (this[0x30] == (ZombieReplacement)0x0) {
    CCSPlayer::State_Transition((CCSPlayer *)param_2,6);
  }
  else {
    g_ZombieClass = *(undefined4 *)this;
    g_ZombieReplacementGender = *(undefined4 *)(this + 0x34);
    CCSPlayer::State_Transition((CCSPlayer *)param_2,0);
    (**(code **)(*(int *)param_2 + 100))(param_2);
    uVar3 = *(uint *)(param_2 + 0x30bc);
    g_ZombieReplacementGender = 0;
    if ((((uVar3 != 0xffffffff) &&
         (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) &&
       (*(CBaseEntity **)(puVar10 + 4) != (CBaseEntity *)0x0)) {
      UTIL_Remove(*(CBaseEntity **)(puVar10 + 4));
    }
  }
  if (this[0x30] != (ZombieReplacement)0x0) {
    iVar7 = *(int *)(this + 0x28);
    if (iVar7 != *(int *)(param_2 + 0x100)) {
      (**(code **)(*(int *)param_2 + 0x214))(param_2,param_2 + 0x100);
      *(int *)(param_2 + 0x100) = iVar7;
    }
    CTerrorPlayer::SetHealthBuffer(param_2,*(float *)(this + 0x2c));
    ZVar2 = this[0x31];
    if (ZVar2 != *(ZombieReplacement *)(param_2 + 0x2d94)) {
      if (param_2[0x6c] == (CTerrorPlayer)0x0) {
        pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar7 + 2) = 0;
        }
      }
      else {
        param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
      }
      *(ZombieReplacement *)(param_2 + 0x2d94) = ZVar2;
    }
  }
  iVar7 = 0;
  CBaseCombatCharacter::RemoveAllWeapons((CBaseCombatCharacter *)param_2);
  if (0 < *(int *)(this + 0x48)) {
    do {
      iVar11 = iVar7 * 4;
      iVar7 = iVar7 + 1;
      (**(code **)(*(int *)param_2 + 0x468))
                (param_2,*(undefined4 *)(*(int *)(this + 0x3c) + iVar11));
    } while (iVar7 < *(int *)(this + 0x48));
  }
  if (*(int *)(this + 0x38) != 0) {
    (**(code **)(*(int *)param_2 + 0x474))(param_2,*(int *)(this + 0x38),0);
  }
  iVar7 = 0;
  do {
    iVar11 = iVar7 + 1;
    CBaseCombatCharacter::SetAmmoCount
              ((CBaseCombatCharacter *)param_2,*(int *)(this + iVar7 * 4 + 0x50),iVar7);
    iVar7 = iVar11;
  } while (iVar11 != 0x20);
  (**(code **)(*(int *)param_2 + 0x1dc))(param_2,this + 4,this + 0x1c,this + 0x10);
  piVar5 = *(int **)(this + 0xf0);
  if (piVar5 == (int *)0x0) {
    local_30 = (CTerrorPlayer *)0xffffffff;
    iVar7 = 0;
  }
  else {
    puVar8 = (uint *)(**(code **)(*piVar5 + 0xc))(piVar5);
    local_30 = (CTerrorPlayer *)*puVar8;
    if (((local_30 == (CTerrorPlayer *)0xffffffff) ||
        (puVar10 = g_pEntityList + ((uint)local_30 & 0xfff) * 0x10,
        puVar10 == (undefined *)0xfffffffc)) || (*(uint *)(puVar10 + 8) != (uint)local_30 >> 0xc)) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar10 + 4);
    }
  }
  uVar3 = *(uint *)(param_2 + 0x30bc);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(CTerrorPlayer **)(param_2 + 0x30bc) = local_30;
  }
  piVar5 = *(int **)(this + 0xf0);
  if (piVar5 != (int *)0x0) {
    (**(code **)(*piVar5 + 0x328))(piVar5,param_2);
  }
  iVar7 = *(int *)(this + 0xd8);
  if (iVar7 != *(int *)(param_2 + 0x330c)) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar11 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(int *)(param_2 + 0x330c) = iVar7;
  }
  CHandle<CTerrorPlayer>::CHandle
            ((CHandle<CTerrorPlayer> *)local_20,*(CTerrorPlayer **)(this + 0xd0));
  if (((local_20[0] == 0xffffffff) ||
      (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
     || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar10 + 4);
  }
  uVar3 = *(uint *)(param_2 + 0x3e64);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(uint *)(param_2 + 0x3e64) = local_20[0];
  }
  iVar7 = *(int *)(this + 0xd0);
  if (iVar7 != 0) {
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x3e68);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x3e68) = local_20[0];
    }
    if (param_2[0x3e78] != (CTerrorPlayer)0x0) {
      if (param_2[0x6c] == (CTerrorPlayer)0x0) {
        pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar7 + 2) = 0;
        }
      }
      else {
        param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
      }
      param_2[0x3e78] = (CTerrorPlayer)0x0;
    }
    param_2[0x3e79] = (CTerrorPlayer)0x1;
    *(undefined4 *)(param_2 + 0x3e7c) = *(undefined4 *)(this + 0xd4);
    fVar1 = *(float *)(ZombiePounceDamageDelay._28_4_ + 0x2c);
    lVar12 = (longdouble)CountdownTimer::Now();
    if ((float)lVar12 + fVar1 != *(float *)(param_2 + 0x3e74)) {
      (**(code **)(*(int *)(param_2 + 0x3e6c) + 4))(param_2 + 0x3e6c,param_2 + 0x3e74);
      *(float *)(param_2 + 0x3e74) = (float)lVar12 + fVar1;
    }
    if (fVar1 != *(float *)(param_2 + 0x3e70)) {
      (**(code **)(*(int *)(param_2 + 0x3e6c) + 4))(param_2 + 0x3e6c,param_2 + 0x3e70);
      *(float *)(param_2 + 0x3e70) = fVar1;
    }
    (**(code **)(**(int **)(this + 0xd0) + 0x7fc))(*(int **)(this + 0xd0),0x56,0);
    (**(code **)(*(int *)param_2 + 0x7fc))(param_2,0x52,0);
  }
  CHandle<CTerrorPlayer>::CHandle
            ((CHandle<CTerrorPlayer> *)local_20,*(CTerrorPlayer **)(this + 0xdc));
  if (((local_20[0] == 0xffffffff) ||
      (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
     || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar10 + 4);
  }
  uVar3 = *(uint *)(param_2 + 0x33c0);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(uint *)(param_2 + 0x33c0) = local_20[0];
  }
  iVar7 = *(int *)(this + 0xdc);
  if (iVar7 != 0) {
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x33c4);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x33c4) = local_20[0];
    }
    if ((*(int *)(this + 0xf0) != 0) &&
       (iVar7 = __dynamic_cast(*(int *)(this + 0xf0),&CBaseAbility::typeinfo,&CTongue::typeinfo,0),
       iVar7 != 0)) {
      local_30 = (CTerrorPlayer *)0x0;
      uVar3 = *(uint *)(iVar7 + 0x47c);
      if ((uVar3 != 0xffffffff) &&
         ((puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc &&
          (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)))) {
        local_30 = *(CTerrorPlayer **)(puVar10 + 4);
      }
      puVar10 = g_pEntityList;
      if (param_1 == local_30) {
        CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
        puVar10 = g_pEntityList;
        if (((local_20[0] == 0xffffffff) ||
            (puVar9 = g_pEntityList + (local_20[0] & 0xfff) * 0x10,
            puVar9 == (undefined *)0xfffffffc)) || (*(uint *)(puVar9 + 8) != local_20[0] >> 0xc)) {
          local_30 = (CTerrorPlayer *)0x0;
        }
        else {
          local_30 = *(CTerrorPlayer **)(puVar9 + 4);
        }
        uVar3 = *(uint *)(iVar7 + 0x47c);
        if (((uVar3 == 0xffffffff) ||
            (puVar9 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
           (*(uint *)(puVar9 + 8) != uVar3 >> 0xc)) {
          iVar11 = 0;
        }
        else {
          iVar11 = *(int *)(puVar9 + 4);
        }
        if (local_30 != (CTerrorPlayer *)iVar11) {
          if (*(char *)(iVar7 + 0x6c) == '\0') {
            pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
            if (pCVar4 != (CBaseEdict *)0x0) {
              *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
              iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
              *(undefined2 *)(iVar11 + 2) = 0;
              puVar10 = g_pEntityList;
            }
          }
          else {
            *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
          }
          *(uint *)(iVar7 + 0x47c) = local_20[0];
        }
      }
      uVar3 = *(uint *)(iVar7 + 0x480);
      local_30 = (CTerrorPlayer *)0x0;
      if (((uVar3 != 0xffffffff) &&
          (puVar10 = puVar10 + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
        local_30 = *(CTerrorPlayer **)(puVar10 + 4);
      }
      if (param_1 == local_30) {
        CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
        if (((local_20[0] == 0xffffffff) ||
            (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10,
            puVar10 == (undefined *)0xfffffffc)) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc))
        {
          local_30 = (CTerrorPlayer *)0x0;
        }
        else {
          local_30 = *(CTerrorPlayer **)(puVar10 + 4);
        }
        uVar3 = *(uint *)(iVar7 + 0x480);
        if (((uVar3 == 0xffffffff) ||
            (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
           || (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
          iVar11 = 0;
        }
        else {
          iVar11 = *(int *)(puVar10 + 4);
        }
        if (local_30 != (CTerrorPlayer *)iVar11) {
          if (*(char *)(iVar7 + 0x6c) == '\0') {
            pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
            if (pCVar4 != (CBaseEdict *)0x0) {
              *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
              iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
              *(undefined2 *)(iVar11 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
          }
          *(uint *)(iVar7 + 0x480) = local_20[0];
        }
      }
    }
  }
  CHandle<CTerrorPlayer>::CHandle
            ((CHandle<CTerrorPlayer> *)local_20,*(CTerrorPlayer **)(this + 0xe0));
  if (((local_20[0] == 0xffffffff) ||
      (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
     || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar10 + 4);
  }
  uVar3 = *(uint *)(param_2 + 0x3edc);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(uint *)(param_2 + 0x3edc) = local_20[0];
  }
  iVar7 = *(int *)(this + 0xe0);
  if (iVar7 != 0) {
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x3ee0);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x3ee0) = local_20[0];
    }
    (**(code **)(*(int *)param_2 + 0x7fc))(param_2,0x54,0);
    (**(code **)(**(int **)(this + 0xe0) + 0x7fc))(*(int **)(this + 0xe0),0x55,0);
  }
  CHandle<CTerrorPlayer>::CHandle
            ((CHandle<CTerrorPlayer> *)local_20,*(CTerrorPlayer **)(this + 0xe4));
  if (((local_20[0] == 0xffffffff) ||
      (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
     || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar10 + 4);
  }
  uVar3 = *(uint *)(param_2 + 0x3e44);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(uint *)(param_2 + 0x3e44) = local_20[0];
  }
  iVar7 = *(int *)(this + 0xe4);
  if (iVar7 != 0) {
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x3e48);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x3e48) = local_20[0];
    }
    (**(code **)(**(int **)(this + 0xe4) + 0x98))(*(int **)(this + 0xe4),param_2,0xffffffff);
    (**(code **)(*(int *)param_2 + 0x7fc))(param_2,0x4a,0);
    (**(code **)(**(int **)(this + 0xe4) + 0x7fc))(*(int **)(this + 0xe4),0x4e,0);
  }
  pCVar6 = *(CTerrorPlayer **)(this + 0xe8);
  if (pCVar6 != (CTerrorPlayer *)0x0) {
    *(CTerrorPlayer **)(this + 0xe4) = pCVar6;
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,pCVar6);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar10 + 4);
    }
    uVar3 = *(uint *)(param_2 + 0x3e44);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (iVar7 != iVar11) {
      if (param_2[0x6c] == (CTerrorPlayer)0x0) {
        pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar7 + 2) = 0;
        }
      }
      else {
        param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
      }
      *(uint *)(param_2 + 0x3e44) = local_20[0];
    }
    iVar7 = *(int *)(this + 0xe4);
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x3e48);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x3e48) = local_20[0];
    }
    (**(code **)(**(int **)(this + 0xe4) + 0x98))(*(int **)(this + 0xe4),param_2,0xffffffff);
    (**(code **)(*(int *)param_2 + 0x7fc))(param_2,0x4a,0);
    (**(code **)(**(int **)(this + 0xe4) + 0x7fc))(*(int **)(this + 0xe4),0x4e,0);
  }
  CHandle<CTerrorPlayer>::CHandle
            ((CHandle<CTerrorPlayer> *)local_20,*(CTerrorPlayer **)(this + 0xec));
  if (((local_20[0] == 0xffffffff) ||
      (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
     || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar10 + 4);
  }
  uVar3 = *(uint *)(param_2 + 0x2a48);
  if (((uVar3 == 0xffffffff) ||
      (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
    iVar11 = 0;
  }
  else {
    iVar11 = *(int *)(puVar10 + 4);
  }
  if (iVar7 != iVar11) {
    if (param_2[0x6c] == (CTerrorPlayer)0x0) {
      pCVar4 = *(CBaseEdict **)(param_2 + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      param_2[0x70] = (CTerrorPlayer)((byte)param_2[0x70] | 1);
    }
    *(uint *)(param_2 + 0x2a48) = local_20[0];
  }
  iVar7 = *(int *)(this + 0xec);
  if (iVar7 != 0) {
    CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_2);
    if (((local_20[0] == 0xffffffff) ||
        (puVar10 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)
        ) || (*(uint *)(puVar10 + 8) != local_20[0] >> 0xc)) {
      local_30 = (CTerrorPlayer *)0x0;
    }
    else {
      local_30 = *(CTerrorPlayer **)(puVar10 + 4);
    }
    uVar3 = *(uint *)(iVar7 + 0x2a4c);
    if (((uVar3 == 0xffffffff) ||
        (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar10 + 8) != uVar3 >> 0xc)) {
      iVar11 = 0;
    }
    else {
      iVar11 = *(int *)(puVar10 + 4);
    }
    if (local_30 != (CTerrorPlayer *)iVar11) {
      if (*(char *)(iVar7 + 0x6c) == '\0') {
        pCVar4 = *(CBaseEdict **)(iVar7 + 0x30);
        if (pCVar4 != (CBaseEdict *)0x0) {
          *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
          iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
          *(undefined2 *)(iVar11 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
      }
      *(uint *)(iVar7 + 0x2a4c) = local_20[0];
    }
    (**(code **)(**(int **)(this + 0xec) + 0x98))(*(int **)(this + 0xec),param_2,0xffffffff);
    (**(code **)(**(int **)(this + 0xec) + 0x7fc))(*(int **)(this + 0xec),0x4f,0);
  }
  if (this[0xf4] != (ZombieReplacement)0x0) {
    (**(code **)(*(int *)param_2 + 0x380))(param_2,0x461c3c00,0,0,0);
  }
  iVar7 = 0;
  if (0 < *(int *)(this + 0x104)) {
    do {
      piVar5 = *(int **)(*(int *)(this + 0xf8) + iVar7 * 4);
      iVar7 = iVar7 + 1;
      (**(code **)(*piVar5 + 0x64c))(piVar5,param_2);
    } while (iVar7 < *(int *)(this + 0x104));
  }
  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)