// 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 ICSharpCode.SharpZipLib.Zip;
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace \u0019\u0002
{
  internal sealed class \u0084\u0002 : IDisposable
  {
    private int \u0001;
    private int \u0002;
    private int \u0003;
    private MemoryStream \u0004;
    private byte[] \u0005;

    public \u0084\u0002() => this.\u0083\u0005();

    public \u0084\u0002([In] byte[] obj0)
    {
      if (obj0 == null)
        this.\u0005 = new byte[0];
      else
        this.\u0005 = obj0;
    }

    public void \u0083\u0005()
    {
      if (this.\u0005 != null && this.\u0005.Length == 0)
        return;
      this.\u0005 = new byte[0];
    }

    [SpecialName]
    public int \u0084\u0005() => this.\u0003;

    [SpecialName]
    public int \u0086\u0005()
    {
      if (this.\u0002 > this.\u0005.Length || this.\u0002 < 4)
        throw new ZipException(\u0008.\u000E\u0003(4291));
      return this.\u0002 + this.\u0003 - this.\u0001;
    }

    public bool \u0087\u0005([In] int obj0)
    {
      this.\u0002 = this.\u0005.Length;
      this.\u0003 = 0;
      this.\u0001 = 0;
      int num1 = this.\u0002;
      int num2 = obj0 - 1;
      while (num2 != obj0 && this.\u0001 < this.\u0005.Length - 3)
      {
        num2 = this.\u008B\u0005();
        num1 = this.\u008B\u0005();
        if (num2 != obj0)
          this.\u0001 += num1;
      }
      bool flag = num2 == obj0 && this.\u0001 + num1 <= this.\u0005.Length;
      if (flag)
      {
        this.\u0002 = this.\u0001;
        this.\u0003 = num1;
      }
      return flag;
    }

    public long \u0088\u0005()
    {
      this.\u008A\u0005(8);
      return (long) this.\u0087\u0003() & (long) uint.MaxValue | (long) this.\u0087\u0003() << 32;
    }

    public int \u0087\u0003()
    {
      this.\u008A\u0005(4);
      int num = (int) this.\u0005[this.\u0001] + ((int) this.\u0005[this.\u0001 + 1] << 8) + ((int) this.\u0005[this.\u0001 + 2] << 16) + ((int) this.\u0005[this.\u0001 + 3] << 24);
      this.\u0001 += 4;
      return num;
    }

    public int \u0086\u0003()
    {
      this.\u008A\u0005(2);
      int num = (int) this.\u0005[this.\u0001] + ((int) this.\u0005[this.\u0001 + 1] << 8);
      this.\u0001 += 2;
      return num;
    }

    public int ReadByte()
    {
      int num = -1;
      if (this.\u0001 < this.\u0005.Length && this.\u0002 + this.\u0003 > this.\u0001)
      {
        num = (int) this.\u0005[this.\u0001];
        ++this.\u0001;
      }
      return num;
    }

    public void \u0089\u0005([In] int obj0)
    {
      this.\u008A\u0005(obj0);
      this.\u0001 += obj0;
    }

    private void \u008A\u0005([In] int obj0)
    {
      if (this.\u0002 > this.\u0005.Length || this.\u0002 < 4)
        throw new ZipException(\u0008.\u000E\u0003(4291));
      if (this.\u0001 > this.\u0002 + this.\u0003 - obj0)
        throw new ZipException(\u0008.\u000E\u0003(4356));
      if (this.\u0001 + obj0 < 4)
        throw new ZipException(\u0008.\u000E\u0003(4381));
    }

    private int \u008B\u0005()
    {
      if (this.\u0001 > this.\u0005.Length - 2)
        throw new ZipException(\u0008.\u000E\u0003(4356));
      int num = (int) this.\u0005[this.\u0001] + ((int) this.\u0005[this.\u0001 + 1] << 8);
      this.\u0001 += 2;
      return num;
    }

    public void Dispose()
    {
      if (this.\u0004 == null)
        return;
      \u0093\u0003.\u007E\u0006\u0005((object) this.\u0004);
    }
  }
}
