// Decompiled with JetBrains decompiler
// Type: .
// Assembly: WindowsBC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9909ee17073e3364
// MVID: 658BFC85-36E1-493D-98E6-AE9127D73D60
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\Trojan-Downloader.MSIL.BitCoinMiner.c-64f742a0b28b2c3d2a62ef6607fcfd5fa55b793a1aff3a6c11e014e3b119149e.exe

using \u000E;
using \u0093;
using System;
using System.IO;
using System.Runtime.InteropServices;

namespace \u0093
{
  internal sealed class \u009D
  {
    public static void \u0093\u0003([In] Stream obj0, [In] byte[] obj1) => \u009D.\u0093\u0003(obj0, obj1, 0, obj1.Length);

    public static void \u0093\u0003([In] Stream obj0, [In] byte[] obj1, [In] int obj2, [In] int obj3)
    {
      if (obj0 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(752));
      if (obj1 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(568));
      if (obj2 < 0 || obj2 > obj1.Length)
        throw new ArgumentOutOfRangeException(\u0008.\u000E\u0003(577));
      if (obj3 < 0 || obj2 + obj3 > obj1.Length)
        throw new ArgumentOutOfRangeException(\u0008.\u000E\u0003(611));
      int num;
      for (; obj3 > 0; obj3 -= num)
      {
        num = \u0089\u0005.\u007E\u000F\u0005((object) obj0, obj1, obj2, obj3);
        if (num <= 0)
          throw new EndOfStreamException();
        obj2 += num;
      }
    }

    public static void \u0094\u0003([In] Stream obj0, [In] Stream obj1, [In] byte[] obj2)
    {
      if (obj0 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(761));
      if (obj1 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(770));
      if (obj2 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(568));
      if (obj2.Length < 128)
        throw new ArgumentException(\u0008.\u000E\u0003(787), \u0008.\u000E\u0003(568));
      bool flag = true;
      while (flag)
      {
        int num = \u0089\u0005.\u007E\u000F\u0005((object) obj0, obj2, 0, obj2.Length);
        if (num > 0)
        {
          \u001F\u0004.\u007E\u0011\u0005((object) obj1, obj2, 0, num);
        }
        else
        {
          \u0093\u0003.\u007E\u0007\u0005((object) obj1);
          flag = false;
        }
      }
    }

    public static void \u0094\u0003(
      [In] Stream obj0,
      [In] Stream obj1,
      [In] byte[] obj2,
      [In] \u0097 obj3,
      [In] TimeSpan obj4,
      [In] object obj5,
      [In] string obj6,
      [In] long obj7)
    {
      if (obj0 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(761));
      if (obj1 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(770));
      if (obj2 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(568));
      if (obj2.Length < 128)
        throw new ArgumentException(\u0008.\u000E\u0003(787), \u0008.\u000E\u0003(568));
      if (obj3 == null)
        throw new ArgumentNullException(\u0008.\u000E\u0003(816));
      bool flag1 = true;
      DateTime dateTime = \u0017\u0004.\u0094\u0002();
      long num1 = 0;
      long num2 = 0;
      if (obj7 >= 0L)
        num2 = obj7;
      else if (\u0007\u0003.\u007E\u009F\u0004((object) obj0))
        num2 = \u007F\u0004.\u007E\u0003\u0005((object) obj0) - \u007F\u0004.\u007E\u0004\u0005((object) obj0);
      \u0094 e1 = new \u0094(obj6, num1, num2);
      obj3(obj5, e1);
      bool flag2 = true;
      while (flag1)
      {
        int num3 = \u0089\u0005.\u007E\u000F\u0005((object) obj0, obj2, 0, obj2.Length);
        if (num3 > 0)
        {
          num1 += (long) num3;
          flag2 = false;
          \u001F\u0004.\u007E\u0011\u0005((object) obj1, obj2, 0, num3);
        }
        else
        {
          \u0093\u0003.\u007E\u0007\u0005((object) obj1);
          flag1 = false;
        }
        if (\u0010\u0003.\u0098\u0003(\u0099\u0003.\u009B\u0002(\u0017\u0004.\u0094\u0002(), dateTime), obj4))
        {
          flag2 = true;
          dateTime = \u0017\u0004.\u0094\u0002();
          \u0094 e2 = new \u0094(obj6, num1, num2);
          obj3(obj5, e2);
          flag1 = e2.\u008B\u0003();
        }
      }
      if (flag2)
        return;
      \u0094 e3 = new \u0094(obj6, num1, num2);
      obj3(obj5, e3);
    }

    private \u009D()
    {
    }
  }
}
