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

namespace \u0019\u0002
{
  internal sealed class \u0092\u0002 : Stream
  {
    private bool \u0001;
    private Stream \u0002;

    public \u0092\u0002([In] Stream obj0) => this.\u0002 = obj0;

    [SpecialName]
    public override bool get_CanRead() => \u0007\u0003.\u007E\u009E\u0004((object) this.\u0002);

    [SpecialName]
    public override bool get_CanSeek() => \u0007\u0003.\u007E\u009F\u0004((object) this.\u0002);

    [SpecialName]
    public override bool get_CanTimeout() => \u0007\u0003.\u007E\u0001\u0005((object) this.\u0002);

    [SpecialName]
    public override long get_Length() => \u007F\u0004.\u007E\u0003\u0005((object) this.\u0002);

    [SpecialName]
    public override long get_Position() => \u007F\u0004.\u007E\u0004\u0005((object) this.\u0002);

    [SpecialName]
    public override void set_Position([In] long obj0) => \u009F\u0004.\u007E\u0005\u0005((object) this.\u0002, obj0);

    [SpecialName]
    public override bool get_CanWrite() => \u0007\u0003.\u007E\u0002\u0005((object) this.\u0002);

    public override void Flush() => \u0093\u0003.\u007E\u0007\u0005((object) this.\u0002);

    public override long Seek([In] long obj0, [In] SeekOrigin obj1) => \u0015\u0004.\u007E\u0008\u0005((object) this.\u0002, obj0, obj1);

    public override void SetLength([In] long obj0) => \u009F\u0004.\u007E\u000E\u0005((object) this.\u0002, obj0);

    public override int Read([In] byte[] obj0, [In] int obj1, [In] int obj2) => \u0089\u0005.\u007E\u000F\u0005((object) this.\u0002, obj0, obj1, obj2);

    public override void Write([In] byte[] obj0, [In] int obj1, [In] int obj2) => \u001F\u0004.\u007E\u0011\u0005((object) this.\u0002, obj0, obj1, obj2);

    public override void Close()
    {
      Stream stream = this.\u0002;
      this.\u0002 = (Stream) null;
      if (!this.\u0001 || stream == null)
        return;
      this.\u0001 = false;
      \u0093\u0003.\u007E\u0006\u0005((object) stream);
    }

    public long \u009B\u0005([In] int obj0, [In] long obj1, [In] int obj2, [In] int obj3)
    {
      long num1 = obj1 - (long) obj2;
      if (num1 < 0L)
        return -1;
      long num2 = \u0081\u0005.\u0086\u0003(num1 - (long) obj3, 0L);
      while (num1 >= num2)
      {
        long num3 = \u0015\u0004.\u007E\u0008\u0005((object) this, num1--, SeekOrigin.Begin);
        if (this.\u0004\u0006() == obj0)
          return \u007F\u0004.\u007E\u0004\u0005((object) this);
      }
      return -1;
    }

    public int \u0003\u0006()
    {
      int num1 = \u0011\u0003.\u007E\u0010\u0005((object) this.\u0002);
      if (num1 < 0)
        throw new EndOfStreamException();
      int num2 = \u0011\u0003.\u007E\u0010\u0005((object) this.\u0002);
      if (num2 < 0)
        throw new EndOfStreamException();
      return num1 | num2 << 8;
    }

    public int \u0004\u0006() => this.\u0003\u0006() | this.\u0003\u0006() << 16;
  }
}
