// Decompiled with JetBrains decompiler
// Type: A.M
// 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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

#nullable enable
namespace A;

internal static class M
{
  private const string Ch = "Global\\RansomGuard_SingleInstance";
  private const string CI = "Global\\RansomGuard_ShowNotification";

  [STAThread]
  private static void A()
  {
    // ISSUE: object of a compiler-generated type is created
    // ISSUE: variable of a compiler-generated type
    M.a a = new M.a();
    G.A(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eW());
    bool flag;
    using (new Mutex(true, F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ew(), ref flag))
    {
      if (!flag)
      {
        try
        {
          using (EventWaitHandle eventWaitHandle = EventWaitHandle.OpenExisting(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eX()))
            eventWaitHandle.Set();
        }
        catch (Exception ex)
        {
        }
      }
      else
      {
        try
        {
          m.A();
        }
        catch (Exception ex)
        {
          int num = (int) MessageBox.Show(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ex() + ex.Message, F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eY(), MessageBoxButtons.OK, MessageBoxIcon.Hand);
          return;
        }
        Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
        // ISSUE: reference to a compiler-generated method
        Q.A();
        Application.ThreadException += (ThreadExceptionEventHandler) (([In] obj0, [In] obj1) => M.A(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.gz(), (object) obj1.Exception));
        AppDomain.CurrentDomain.UnhandledException += (UnhandledExceptionEventHandler) (([In] obj0, [In] obj1) => M.A(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.HA(), obj1.ExceptionObject));
        TaskScheduler.UnobservedTaskException += (EventHandler<UnobservedTaskExceptionEventArgs>) ((s, [In] obj1) =>
        {
          M.A(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.Ha(), (object) obj1.Exception);
          obj1.SetObserved();
        });
        // ISSUE: reference to a compiler-generated field
        a.eK = new n();
        // ISSUE: reference to a compiler-generated field
        a.ek = new CancellationTokenSource();
        // ISSUE: reference to a compiler-generated method
        Task.Run(new Action(a.A));
        // ISSUE: reference to a compiler-generated field
        // ISSUE: reference to a compiler-generated method
        a.eK.FormClosing += new FormClosingEventHandler(a.A);
        try
        {
          // ISSUE: reference to a compiler-generated field
          Application.Run((Form) a.eK);
        }
        finally
        {
          // ISSUE: reference to a compiler-generated field
          a.ek.Cancel();
          // ISSUE: reference to a compiler-generated field
          a.ek.Dispose();
        }
      }
    }
  }

  private static void A([In] string obj0, [In] object obj1)
  {
    string str = obj1?.ToString() ?? F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ey();
    DefaultInterpolatedStringHandler interpolatedStringHandler = new DefaultInterpolatedStringHandler(13, 3);
    interpolatedStringHandler.AppendLiteral(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eZ());
    interpolatedStringHandler.AppendFormatted(obj0);
    interpolatedStringHandler.AppendLiteral(F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.DR());
    interpolatedStringHandler.AppendFormatted(Environment.NewLine);
    interpolatedStringHandler.AppendFormatted(str);
    int num = (int) MessageBox.Show(interpolatedStringHandler.ToStringAndClear(), F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.ez() + obj0, MessageBoxButtons.OK, MessageBoxIcon.Hand);
  }

  private static void A([In] Form obj0, [In] CancellationToken obj1)
  {
    // ISSUE: object of a compiler-generated type is created
    // ISSUE: variable of a compiler-generated type
    M.B b = new M.B();
    // ISSUE: reference to a compiler-generated field
    b.eL = obj0;
    try
    {
      using (EventWaitHandle eventWaitHandle = new EventWaitHandle(false, (EventResetMode) 0, F5D1BF18\u002D5FBA\u002D43C1\u002DA4E0\u002D6D909C027158.eX()))
      {
        while (!obj1.IsCancellationRequested)
        {
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          if (((WaitHandle) eventWaitHandle).WaitOne(500) && !b.eL.IsDisposed && b.eL.IsHandleCreated)
          {
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated method
            b.eL.Invoke(b.el ?? (b.el = new Action(b.A)));
          }
        }
      }
    }
    catch (Exception ex)
    {
    }
  }
}
