// Decompiled with JetBrains decompiler
// Type: A.J
// Assembly: RansomGuard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 37652FF6-4FF5-4E76-944D-E6CA5073036F
// Assembly location: RansomGuard.dll inside C:\Users\WDAGUtilityAccount\Desktop\RansomGuard.exe)

using \u003CPrivateImplementationDetails\u003E\u007B29195D03\u002D3E0A\u002D468D\u002DA5D2\u002D1BA9D027086D\u007D;
using System;
using System.Net.Http;
using System.Runtime.InteropServices;

#nullable enable
namespace A;

internal static class J
{
  private static readonly string[] bt = new string[3]
  {
    F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ee(),
    F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eF(),
    F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ef()
  };
  private static readonly TimeSpan bU = TimeSpan.FromHours(24.0);
  private static readonly HttpClientHandler bu = new HttpClientHandler()
  {
    UseCookies = false
  };

  internal static DateTime A()
  {
    DateTime utcNow = DateTime.UtcNow;
    DateTime? nullable = new DateTime?();
    try
    {
      using (HttpClient httpClient = J.A(J.A.eC))
      {
        foreach (string requestUri in J.bt)
        {
          try
          {
            using (HttpResponseMessage httpResponseMessage = httpClient.Send(new HttpRequestMessage(HttpMethod.Head, requestUri)))
            {
              if (httpResponseMessage.Headers.Date.HasValue)
              {
                nullable = new DateTime?(httpResponseMessage.Headers.Date.Value.UtcDateTime);
                break;
              }
            }
          }
          catch
          {
          }
        }
      }
    }
    catch
    {
    }
    if (!nullable.HasValue)
      return utcNow;
    TimeSpan.op_GreaterThan(DateTime.op_Subtraction(nullable.Value, utcNow), J.bU);
    return nullable.Value;
  }

  internal static int? A([In] int obj0)
  {
    try
    {
      IntPtr num1 = G.A(G.ProcessAccessFlags.QueryInformation, false, obj0);
      if (num1 == IntPtr.Zero)
        return new int?();
      try
      {
        G.B b = new G.B();
        int num2 = 0;
        return G.A(num1, 0, ref b, Marshal.SizeOf<G.B>(b), ref num2) == 0 ? new int?(b.Ev) : new int?();
      }
      finally
      {
        G.A(num1);
      }
    }
    catch
    {
      return new int?();
    }
  }

  internal static HttpClient A([In] TimeSpan obj0)
  {
    return new HttpClient((HttpMessageHandler) J.bu, false)
    {
      Timeout = obj0
    };
  }

  internal static class A
  {
    internal static readonly TimeSpan eC = TimeSpan.FromSeconds(1.0);
    internal static readonly TimeSpan ec = TimeSpan.FromSeconds(5.0);
    internal static readonly TimeSpan eD = TimeSpan.FromSeconds(10.0);
  }
}
