aimware desync [3 mart]

  • Автор темы Darksok
  • Дата начала

Darksok

Darksok

  • 1 Янв 1970
  • 0
  • 0
C++:
char __userpurge DesyncDirection@<al>(CRagebot *a1@<ecx>, __m128i jitter@<xmm2>, int direction, int cmd_hash, int cmd_hash1)
{
  CRagebot *This; // edi
  CCSGOPlayerAnimState *animState; // esi
  __m128 v7; // xmm1
  __m128 v8; // xmm0
  __m128 v9; // xmm1
  __m128 feetSinCos; // ST30_16
  __m128 v11; // xmm0
  __m128 v12; // xmm1
  __m128 currentFeetYaw; // ST20_16
  __m128 previousFeetYaw; // xmm0
  float v15; // ST18_4
  float v16; // xmm1_4
  bool v17; // cf
  bool v18; // zf
  float v19; // xmm1_4
  float v20; // xmm0_4
  float v21; // xmm0_4
  char result; // al
  float v23; // [esp+14h] [ebp-2Ch]

  This = a1;
  animState = *((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37));
  if ( !animState )
    goto LABEL_18;
  v7 = LODWORD(animState->m_flCurrentFeetYaw);
  v7.m128_f32[0] = v7.m128_f32[0] * 0.017453292;
  v8 = ScalarSinCos(v7);
  v9 = LODWORD(This->m_flCurrentFeetYaw);
  v9.m128_f32[0] = v9.m128_f32[0] * 0.017453292;
  feetSinCos = v8;
  v11 = ScalarSinCos(v9);
  v12 = LODWORD(This->m_flPreviousFeetYaw);
  v12.m128_f32[0] = v12.m128_f32[0] * 0.017453292;
  currentFeetYaw = v11;
  previousFeetYaw = ScalarSinCos(v12);
  This->m_flPreviousFeetYaw = This->m_flCurrentFeetYaw;
  This->m_flCurrentFeetYaw = animState->m_flCurrentFeetYaw;
  v15 = atan2(
          ((currentFeetYaw.m128_f32[0] + feetSinCos.m128_f32[0]) + previousFeetYaw.m128_f32[0]),
          ((COERCE_FLOAT(_mm_shuffle_ps(currentFeetYaw, currentFeetYaw, 1))
          + COERCE_FLOAT(_mm_shuffle_ps(feetSinCos, feetSinCos, 1)))
         + COERCE_FLOAT(_mm_shuffle_ps(previousFeetYaw, previousFeetYaw, 1))));
  v23 = fmod(((v15 * 57.295776) - *jitter.m128i_i32), 360.0);
  v16 = v23;
  if ( (v15 * 57.295776) <= *jitter.m128i_i32 )
  {
    if ( v23 <= -180.0 )
      v16 = v23 + 360.0;
  }
  else if ( v23 >= 180.0 )
  {
    v16 = v23 - 360.0;
  }
  if ( direction == 1 )
  {
    v17 = v16 > 0.0;
    v18 = v16 == 0.0;
  }
  else
  {
    v17 = v16 < 0.0;
    v18 = v16 == 0.0;
  }
  if ( v17 || v18 )
  {
LABEL_18:
    This->m_iJitterIteration = 1;
    result = 0;
  }
  else
  {
    v19 = (30 * (This->m_iJitterIteration % 12));
    v20 = *((cmd_hash ^ cmd_hash1) - 1425092403);
    if ( direction == 1 )
      v21 = v20 - v19;
    else
      v21 = v20 + v19;
    *((cmd_hash ^ cmd_hash1) - 1425092403) = v21;
    *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12EAF) = 1;// ShouldChoked
    result = 1;
    ++This->m_iJitterIteration;
  }
  return result;
}
char __thiscall Ragebot::DesyncAnimations(CRagebot *this, int type, int cmd_hash, int cmd_hash_1)
{
  CRagebot *This; // edi
  int v5; // eax
  int dsc_type; // esi
  int localAnimState; // edx
  int v8; // ecx
  int v9; // ebx
  signed int direction; // ebp
  float dsc; // xmm0_4
  float v12; // xmm1_4
  float yaw; // xmm0_4
  float lby_delta; // xmm1_4
  float desync_length; // xmm2_4
  __m128i jitter; // xmm1
  float final_yaw; // xmm0_4
  char result; // al
  int v19; // eax
  int v20; // eax
  float v21; // xmm1_4
  float v22; // xmm1_4
  Vector4D stretch; // xmm2
  float max_desync; // xmm2_4
  float balance; // xmm1_4
  int v26; // eax
  int v27; // eax
  float v28; // xmm1_4
  float lby_delta_1; // [esp+14h] [ebp-4h]
  int typea; // [esp+1Ch] [ebp+4h]
  float dsc_1; // [esp+1Ch] [ebp+4h]

  This = this;
  if ( this->m_bAutomaticDir )
  {
    if ( rbot_antiaim_autodir == 2 )            // Desync
    {
      v5 = this->m_iAutoDirection;
      dsc_type = 3 - (v5 != 1);
      *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = *((cmd_hash ^ cmd_hash_1) - 1425092403) - (90 * v5);
      goto LABEL_7;
    }
    if ( rbot_antiaim_autodir == 3 )            // Desync jitter
    {
      dsc_type = Jitter;
      goto LABEL_8;
    }
  }
  dsc_type = type;
LABEL_7:
  if ( !dsc_type )
    return 0;
LABEL_8:
  localAnimState = *((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37));
  v8 = CRC32_Table[(*((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37)) >> 8)
                 + (((*((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37)) >> 16) & 7) << 8)];
  v9 = v8 ^ (localAnimState + 0x54F12F43);
  typea = CRC32_Table[(*((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37)) >> 8)
                    + (((*((m_AnimState ^ *(m_AnimStateHash ^ 0x54F12F43)) + *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12F37)) >> 16) & 7) << 8)];
  if ( (v8 ^ v8 ^ (localAnimState + 0x54F12F43)) == 0x54F12F43 )
    return 0;
  direction = 1;
  if ( dsc_type == Jitter )
  {
    if ( rbot_antiaim_autodir )
    {
      direction = This->m_iAutoDirection;
      if ( !This->m_bAutomaticDir )
      {
        *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = (90 * direction) + *((cmd_hash ^ cmd_hash_1) - 0x54F12F33);
        v8 = typea;
      }
    }
    else
    {
      *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) + 90.0;
    }
    dsc = CalculateDesyncDelta(((v9 ^ v8) - 0x54F12F43));
    v12 = 180.0 - dsc;
    dsc_1 = dsc;
    yaw = *((cmd_hash ^ cmd_hash_1) - 0x54F12F33);
    lby_delta = v12 + 10.0;
    lby_delta_1 = lby_delta;
    desync_length = 180.0 - (lby_delta * 0.5);
    jitter = COERCE_UNSIGNED_INT((90 * direction));
    *jitter.m128i_i32 = *jitter.m128i_i32 + yaw;
    if ( direction == 1 )
    {
      final_yaw = yaw + desync_length;
    }
    else
    {
      if ( direction != -1 )
      {
LABEL_19:
        if ( DesyncDirection(This, jitter, direction != 1, cmd_hash, cmd_hash_1) )
        {
          This->m_iJitter = 0;
          return 1;
        }
        if ( *((gpGlobalsHash1 ^ gpGlobalsHash2) - 0x54F12F33) < *((LBYPredHash1 ^ LBYPredHash2) - 0x54F12F3F) )
        {
          v19 = This->m_iJitter;
        }
        else
        {
          This->m_iJitter = 0;
          v19 = 0;
        }
        v20 = v19 - 1;
        if ( v20 )
        {
          if ( v20 == 1 )
          {
            if ( direction == 1 )
              v21 = lby_delta_1;
            else
              v21 = dsc_1 - 190.0;
            *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) + v21;
          }
        }
        else
        {
          if ( direction == 1 )
            v22 = dsc_1 - 190.0;
          else
            v22 = lby_delta_1;
          *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) + v22;
          *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12EAF) = 1;
        }
        if ( ++This->m_iJitter >= 3 )
          This->m_iJitter = 0;
        goto LABEL_52;
      }
      final_yaw = yaw - desync_length;
    }
    *((cmd_hash ^ cmd_hash_1) - 1425092403) = final_yaw;
    goto LABEL_19;
  }
  stretch = *((cmd_hash ^ cmd_hash_1) - 1425092403);
  if ( dsc_type == Stretch )
    stretch.x = stretch.x - 90.0;
  else
    stretch.x = stretch.x + 90.0;
  if ( DesyncDirection(This, stretch, dsc_type == 3, cmd_hash, cmd_hash_1) )
    return 1;
  max_desync = CalculateDesyncDelta(((typea ^ v9) - 0x54F12F43));
  if ( dsc_type == Balance )
    balance = -1.0;
  else
    balance = 1.0;
  if ( *((gpGlobalsHash1 ^ gpGlobalsHash2) - 1425092403) <= *((LBYPredHash1 ^ LBYPredHash2) - 0x54F12F3F) )
  {
    if ( *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12EAB) >= 2 )
      goto LABEL_52;
    v26 = cmd_hash ^ cmd_hash_1;
    if ( dsc_type == 1 )
      *(v26 - 0x54F12F33) = *(v26 - 1425092403) - 100.0;
    else
      *(v26 - 0x54F12F33) = (balance * 120.0) + *(v26 - 0x54F12F33);
  }
  else if ( dsc_type != Still )
  {
    *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) = *((cmd_hash ^ cmd_hash_1) - 0x54F12F33) - ((max_desync + 30.0) * balance);
  }
  *((GlobalsXor1 ^ GlobalsXor2) - 0x54F12EAF) = 1;
LABEL_52:
  v27 = cmd_hash ^ cmd_hash_1;
  v28 = *((cmd_hash ^ cmd_hash_1) - 1425092403);
  if ( v28 <= 180.0 )
  {
    if ( v28 < -180.0 )
      v28 = v28 + 360.0;
    *(v27 - 0x54F12F33) = v28;
    result = 1;
  }
  else
  {
    *(v27 - 0x54F12F33) = v28 - 360.0;
    result = 1;
  }
  return result;
}
 
Сверху