示例#1
0
        public Class48()
        {
            uint num = 0u;

            while ((ulong)num < (ulong)((long)Class48.uint_0.Length))
            {
                Class48.uint_0[(int)((UIntPtr)num)] = Class48.smethod_0(num);
                num += 1u;
            }
        }
示例#2
0
        private int method_11()
        {
            OGGClass5 oggClass5 = new OGGClass5();
            Class47   class47_  = new Class47();
            Class48   @class    = new Class48();

            int[] array = new int[1];
            int   num   = this.method_2(oggClass5, class47_, array, null);
            int   num2  = array[0];
            int   int_  = (int)this.long_0;

            this.class56_0.method_2();
            if (num == -1)
            {
                return(-1);
            }
            this.bool_0 = true;
            OGGStream.smethod_0(this.fileStream, 0L, OGGStream.int_5);
            this.long_0 = OGGStream.smethod_1(this.fileStream);
            long num3 = this.long_0;

            num3 = (long)this.method_1(@class);
            if (@class.method_5() != num2)
            {
                if (this.method_13(0L, 0L, num3 + 1L, num2, 0) < 0)
                {
                    this.method_22();
                    return(OGGStream.int_9);
                }
            }
            else if (this.method_13(0L, num3, num3 + 1L, num2, 0) < 0)
            {
                this.method_22();
                return(OGGStream.int_9);
            }
            this.method_3(oggClass5, class47_, int_);
            return(this.method_17(0));
        }
示例#3
0
 private int method_0(Class48 class48_0, long long_6)
 {
     if (long_6 > 0L)
     {
         long_6 += this.long_0;
     }
     while (long_6 <= 0L || this.long_0 < long_6)
     {
         int num = this.class52_0.method_3(class48_0);
         if (num < 0)
         {
             this.long_0 -= (long)num;
         }
         else
         {
             if (num != 0)
             {
                 int result = (int)this.long_0;
                 this.long_0 += (long)num;
                 return(result);
             }
             if (long_6 == 0L)
             {
                 return(OGGStream.int_6);
             }
             int num2 = this.method_7();
             if (num2 == 0)
             {
                 return(OGGStream.int_7);
             }
             if (num2 < 0)
             {
                 return(OGGStream.int_9);
             }
         }
     }
     return(OGGStream.int_6);
 }
示例#4
0
        private int method_1(Class48 class48_0)
        {
            long num  = this.long_0;
            int  num2 = -1;
            int  num3;

            while (num2 == -1)
            {
                num -= (long)OGGStream.int_2;
                if (num < 0L)
                {
                    num = 0L;
                }
                this.method_8(num);
                while (this.long_0 < num + (long)OGGStream.int_2)
                {
                    num3 = this.method_0(class48_0, num + (long)OGGStream.int_2 - this.long_0);
                    if (num3 == OGGStream.int_9)
                    {
                        return(OGGStream.int_9);
                    }
                    if (num3 < 0)
                    {
                        break;
                    }
                    num2 = num3;
                }
            }
            this.method_8((long)num2);
            num3 = this.method_0(class48_0, (long)OGGStream.int_2);
            if (num3 < 0)
            {
                return(OGGStream.int_10);
            }
            return(num2);
        }
示例#5
0
 private void method_3(OGGClass5 class49_1, Class47 class47_1, int int_24)
 {
     Class48 @class = new Class48();
     this.oggClass5 = new OGGClass5[this.int_20];
     this.class47_0 = new Class47[this.int_20];
     this.long_2 = new long[this.int_20];
     this.long_3 = new long[this.int_20];
     this.int_21 = new int[this.int_20];
     int i = 0;
     while (i < this.int_20)
     {
         if (class49_1 != null && class47_1 != null && i == 0)
         {
             this.oggClass5[i] = class49_1;
             this.class47_0[i] = class47_1;
             this.long_2[i] = (long)int_24;
         }
         else
         {
             this.method_8(this.long_1[i]);
             if (this.method_2(this.oggClass5[i], this.class47_0[i], null, null) == -1)
             {
                 Console.Error.WriteLine("Error opening logical bitstream #" + (i + 1) + "\n");
                 this.long_2[i] = -1L;
             }
             else
             {
                 this.long_2[i] = this.long_0;
                 this.class56_0.method_2();
             }
         }
         long long_ = this.long_1[i + 1];
         this.method_8(long_);
         long num2;
         while (true)
         {
             int num = this.method_1(@class);
             if (num == -1)
             {
                 goto Block_6;
             }
             num2 = @class.method_4();
             if (num2 != -1L)
             {
                 goto Block_5;
             }
         }
     IL_189:
         i++;
         continue;
         Block_5:
         this.int_21[i] = @class.method_5();
         this.long_3[i] = num2;
         goto IL_189;
         Block_6:
         Console.Error.WriteLine("Could not find last page of logical bitstream #" + i + "\n");
         this.oggClass5[i].method_1();
         this.class47_0[i].method_2();
         goto IL_189;
     }
 }
示例#6
0
        private int method_6(int int_24)
        {
            Class48 @class = new Class48();
            Class67 class2;
            long    num2;

            while (true)
            {
                if (this.bool_1)
                {
                    class2 = new Class67();
                    int num = this.class56_0.method_5(class2);
                    if (num > 0)
                    {
                        num2 = class2.long_0;
                        if (this.oggClass6.method_2(class2) == 0)
                        {
                            goto Block_11;
                        }
                    }
                }
                if (int_24 == 0)
                {
                    return(0);
                }
                if (this.method_0(@class, -1L) < 0)
                {
                    return(0);
                }
                this.float_0 += (float)(@class.int_1 << 3);
                if (this.bool_1 && this.int_22 != @class.method_5())
                {
                    this.method_5();
                }
                if (!this.bool_1)
                {
                    if (this.bool_0)
                    {
                        this.int_22 = @class.method_5();
                        int num3 = 0;
                        while (num3 < this.int_20 && this.int_21[num3] != this.int_22)
                        {
                            num3++;
                        }
                        if (num3 == this.int_20)
                        {
                            break;
                        }
                        this.int_23 = num3;
                        this.class56_0.method_1(this.int_22);
                        this.class56_0.method_7();
                    }
                    else
                    {
                        int[] array = new int[1];
                        int   num4  = this.method_2(this.oggClass5[0], this.class47_0[0], array, @class);
                        this.int_22 = array[0];
                        if (num4 != 0)
                        {
                            return(num4);
                        }
                        this.int_23++;
                    }
                    this.method_4();
                }
                this.class56_0.method_6(@class);
            }
            return(-1);

Block_11:
            int num5 = this.oggClass1.method_3();

            this.oggClass1.method_2(this.oggClass6);
            this.float_1 += (float)(this.oggClass1.method_3() - num5);
            this.float_0 += (float)(class2.int_1 * 8);
            if (num2 != -1L && class2.int_3 == 0)
            {
                int num6 = this.bool_0 ? this.int_23 : 0;
                int num7 = this.oggClass1.method_3();
                num2 -= (long)num7;
                for (int i = 0; i < num6; i++)
                {
                    num2 += this.long_3[i];
                }
                this.long_4 = num2;
            }
            return(1);
        }
示例#7
0
        private void method_3(OGGClass5 class49_1, Class47 class47_1, int int_24)
        {
            Class48 @class = new Class48();

            this.oggClass5 = new OGGClass5[this.int_20];
            this.class47_0 = new Class47[this.int_20];
            this.long_2    = new long[this.int_20];
            this.long_3    = new long[this.int_20];
            this.int_21    = new int[this.int_20];
            int i = 0;

            while (i < this.int_20)
            {
                if (class49_1 != null && class47_1 != null && i == 0)
                {
                    this.oggClass5[i] = class49_1;
                    this.class47_0[i] = class47_1;
                    this.long_2[i]    = (long)int_24;
                }
                else
                {
                    this.method_8(this.long_1[i]);
                    if (this.method_2(this.oggClass5[i], this.class47_0[i], null, null) == -1)
                    {
                        Console.Error.WriteLine("Error opening logical bitstream #" + (i + 1) + "\n");
                        this.long_2[i] = -1L;
                    }
                    else
                    {
                        this.long_2[i] = this.long_0;
                        this.class56_0.method_2();
                    }
                }
                long long_ = this.long_1[i + 1];
                this.method_8(long_);
                long num2;
                while (true)
                {
                    int num = this.method_1(@class);
                    if (num == -1)
                    {
                        goto Block_6;
                    }
                    num2 = @class.method_4();
                    if (num2 != -1L)
                    {
                        goto Block_5;
                    }
                }
IL_189:
                i++;
                continue;
Block_5:
                this.int_21[i] = @class.method_5();
                this.long_3[i] = num2;
                goto IL_189;
Block_6:
                Console.Error.WriteLine("Could not find last page of logical bitstream #" + i + "\n");
                this.oggClass5[i].method_1();
                this.class47_0[i].method_2();
                goto IL_189;
            }
        }
示例#8
0
        private int method_2(OGGClass5 oggClass5, Class47 class47_1, int[] int_24, Class48 class48_0)
        {
            Class48 @class   = new Class48();
            Class67 class67_ = new Class67();

            if (class48_0 == null)
            {
                int num = this.method_0(@class, (long)OGGStream.int_2);
                if (num == OGGStream.int_9)
                {
                    return(OGGStream.int_9);
                }
                if (num < 0)
                {
                    return(OGGStream.int_13);
                }
                class48_0 = @class;
            }
            if (int_24 != null)
            {
                int_24[0] = class48_0.method_5();
            }
            this.class56_0.method_1(class48_0.method_5());
            oggClass5.method_0();
            class47_1.method_0();
            int i = 0;

            while (i < 3)
            {
                this.class56_0.method_6(class48_0);
                while (i < 3)
                {
                    int num2 = this.class56_0.method_5(class67_);
                    if (num2 == 0)
                    {
                        break;
                    }
                    if (num2 == -1)
                    {
                        Console.Error.WriteLine("Corrupt header in logical bitstream.");
                        oggClass5.method_1();
                        class47_1.method_2();
                        this.class56_0.method_2();
                        return(-1);
                    }
                    if (oggClass5.method_4(class47_1, class67_) != 0)
                    {
                        Console.Error.WriteLine("Illegal header in logical bitstream.");
                        oggClass5.method_1();
                        class47_1.method_2();
                        this.class56_0.method_2();
                        return(-1);
                    }
                    i++;
                }
                if (i < 3 && this.method_0(class48_0, 1L) < 0)
                {
                    Console.Error.WriteLine("Missing header in logical bitstream.");
                    oggClass5.method_1();
                    class47_1.method_2();
                    this.class56_0.method_2();
                    return(-1);
                }
            }
            return(0);
        }
示例#9
0
 public int method_3(Class48 class48_1)
 {
     int num = this.int_2;
     int num2 = this.int_1 - this.int_2;
     if (this.int_4 == 0)
     {
         if (num2 < 27)
         {
             return 0;
         }
         if (this.byte_0[num] == 79 && this.byte_0[num + 1] == 103 && this.byte_0[num + 2] == 103)
         {
             if (this.byte_0[num + 3] == 83)
             {
                 int num3 = (int)((this.byte_0[num + 26] & 255) + 27);
                 if (num2 < num3)
                 {
                     return 0;
                 }
                 for (int i = 0; i < (int)(this.byte_0[num + 26] & 255); i++)
                 {
                     this.int_5 += (int)(this.byte_0[num + 27 + i] & 255);
                 }
                 this.int_4 = num3;
                 goto IL_11E;
             }
         }
         this.int_4 = 0;
         this.int_5 = 0;
         int num4 = 0;
         for (int j = 0; j < num2 - 1; j++)
         {
             if (this.byte_0[num + 1 + j] == 79)
             {
                 num4 = num + 1 + j;
                 goto IL_108;
             }
         }
     IL_108:
         if (num4 == 0)
         {
             num4 = this.int_1;
         }
         this.int_2 = num4;
         return -(num4 - num);
     }
     IL_11E:
     if (this.int_5 + this.int_4 > num2)
     {
         return 0;
     }
     lock (this.byte_1)
     {
         Buffer.BlockCopy(this.byte_0, num + 22, this.byte_1, 0, 4);
         this.byte_0[num + 22] = 0;
         this.byte_0[num + 23] = 0;
         this.byte_0[num + 24] = 0;
         this.byte_0[num + 25] = 0;
         Class48 @class = this.class48_0;
         @class.byte_0 = this.byte_0;
         @class.int_0 = num;
         @class.int_1 = this.int_4;
         @class.byte_1 = this.byte_0;
         @class.int_2 = num + this.int_4;
         @class.int_3 = this.int_5;
         @class.method_7();
         if (this.byte_1[0] == this.byte_0[num + 22] && this.byte_1[1] == this.byte_0[num + 23] && this.byte_1[2] == this.byte_0[num + 24])
         {
             if (this.byte_1[3] == this.byte_0[num + 25])
             {
                 goto IL_2B0;
             }
         }
         Buffer.BlockCopy(this.byte_1, 0, this.byte_0, num + 22, 4);
         this.int_4 = 0;
         this.int_5 = 0;
         int num4 = 0;
         for (int k = 0; k < num2 - 1; k++)
         {
             if (this.byte_0[num + 1 + k] == 79)
             {
                 num4 = num + 1 + k;
                 goto IL_28C;
             }
         }
     IL_28C:
         if (num4 == 0)
         {
             num4 = this.int_1;
         }
         this.int_2 = num4;
         return -(num4 - num);
     }
     IL_2B0:
     num = this.int_2;
     if (class48_1 != null)
     {
         class48_1.byte_0 = this.byte_0;
         class48_1.int_0 = num;
         class48_1.int_1 = this.int_4;
         class48_1.byte_1 = this.byte_0;
         class48_1.int_2 = num + this.int_4;
         class48_1.int_3 = this.int_5;
     }
     this.int_3 = 0;
     this.int_2 += (num2 = this.int_4 + this.int_5);
     this.int_4 = 0;
     this.int_5 = 0;
     return num2;
 }
示例#10
0
 private int method_6(int int_24)
 {
     Class48 @class = new Class48();
     Class67 class2;
     long num2;
     while (true)
     {
         if (this.bool_1)
         {
             class2 = new Class67();
             int num = this.class56_0.method_5(class2);
             if (num > 0)
             {
                 num2 = class2.long_0;
                 if (this.oggClass6.method_2(class2) == 0)
                 {
                     goto Block_11;
                 }
             }
         }
         if (int_24 == 0)
         {
             return 0;
         }
         if (this.method_0(@class, -1L) < 0)
         {
             return 0;
         }
         this.float_0 += (float)(@class.int_1 << 3);
         if (this.bool_1 && this.int_22 != @class.method_5())
         {
             this.method_5();
         }
         if (!this.bool_1)
         {
             if (this.bool_0)
             {
                 this.int_22 = @class.method_5();
                 int num3 = 0;
                 while (num3 < this.int_20 && this.int_21[num3] != this.int_22)
                 {
                     num3++;
                 }
                 if (num3 == this.int_20)
                 {
                     break;
                 }
                 this.int_23 = num3;
                 this.class56_0.method_1(this.int_22);
                 this.class56_0.method_7();
             }
             else
             {
                 int[] array = new int[1];
                 int num4 = this.method_2(this.oggClass5[0], this.class47_0[0], array, @class);
                 this.int_22 = array[0];
                 if (num4 != 0)
                 {
                     return num4;
                 }
                 this.int_23++;
             }
             this.method_4();
         }
         this.class56_0.method_6(@class);
     }
     return -1;
     Block_11:
     int num5 = this.oggClass1.method_3();
     this.oggClass1.method_2(this.oggClass6);
     this.float_1 += (float)(this.oggClass1.method_3() - num5);
     this.float_0 += (float)(class2.int_1 * 8);
     if (num2 != -1L && class2.int_3 == 0)
     {
         int num6 = this.bool_0 ? this.int_23 : 0;
         int num7 = this.oggClass1.method_3();
         num2 -= (long)num7;
         for (int i = 0; i < num6; i++)
         {
             num2 += this.long_3[i];
         }
         this.long_4 = num2;
     }
     return 1;
 }
示例#11
0
 private int method_2(OGGClass5 oggClass5, Class47 class47_1, int[] int_24, Class48 class48_0)
 {
     Class48 @class = new Class48();
     Class67 class67_ = new Class67();
     if (class48_0 == null)
     {
         int num = this.method_0(@class, (long)OGGStream.int_2);
         if (num == OGGStream.int_9)
         {
             return OGGStream.int_9;
         }
         if (num < 0)
         {
             return OGGStream.int_13;
         }
         class48_0 = @class;
     }
     if (int_24 != null)
     {
         int_24[0] = class48_0.method_5();
     }
     this.class56_0.method_1(class48_0.method_5());
     oggClass5.method_0();
     class47_1.method_0();
     int i = 0;
     while (i < 3)
     {
         this.class56_0.method_6(class48_0);
         while (i < 3)
         {
             int num2 = this.class56_0.method_5(class67_);
             if (num2 == 0)
             {
                 break;
             }
             if (num2 == -1)
             {
                 Console.Error.WriteLine("Corrupt header in logical bitstream.");
                 oggClass5.method_1();
                 class47_1.method_2();
                 this.class56_0.method_2();
                 return -1;
             }
             if (oggClass5.method_4(class47_1, class67_) != 0)
             {
                 Console.Error.WriteLine("Illegal header in logical bitstream.");
                 oggClass5.method_1();
                 class47_1.method_2();
                 this.class56_0.method_2();
                 return -1;
             }
             i++;
         }
         if (i < 3 && this.method_0(class48_0, 1L) < 0)
         {
             Console.Error.WriteLine("Missing header in logical bitstream.");
             oggClass5.method_1();
             class47_1.method_2();
             this.class56_0.method_2();
             return -1;
         }
     }
     return 0;
 }
示例#12
0
        private int method_13(long long_6, long long_7, long long_8, int int_24, int int_25)
        {
            long    num    = long_8;
            long    long_9 = long_8;
            Class48 @class = new Class48();
            int     num3;

            while (long_7 < num)
            {
                long num2;
                if (num - long_7 < (long)OGGStream.int_2)
                {
                    num2 = long_7;
                }
                else
                {
                    num2 = (long_7 + num) / 2L;
                }
                this.method_8(num2);
                num3 = this.method_0(@class, -1L);
                if (num3 == OGGStream.int_9)
                {
                    return(OGGStream.int_9);
                }
                if (num3 >= 0)
                {
                    if (@class.method_5() == int_24)
                    {
                        long_7 = (long)(num3 + @class.int_1 + @class.int_3);
                        continue;
                    }
                }
                num = num2;
                if (num3 >= 0)
                {
                    long_9 = (long)num3;
                }
            }
            this.method_8(long_9);
            num3 = this.method_0(@class, -1L);
            if (num3 == OGGStream.int_9)
            {
                return(OGGStream.int_9);
            }
            if (long_7 < long_8)
            {
                if (num3 != -1)
                {
                    num3 = this.method_13(long_9, this.long_0, long_8, @class.method_5(), int_25 + 1);
                    if (num3 == OGGStream.int_9)
                    {
                        return(OGGStream.int_9);
                    }
                    goto IL_FF;
                }
            }
            this.int_20             = int_25 + 1;
            this.long_1             = new long[int_25 + 2];
            this.long_1[int_25 + 1] = long_7;
IL_FF:
            this.long_1[int_25] = long_6;
            return(0);
        }
示例#13
0
 private int method_13(long long_6, long long_7, long long_8, int int_24, int int_25)
 {
     long num = long_8;
     long long_9 = long_8;
     Class48 @class = new Class48();
     int num3;
     while (long_7 < num)
     {
         long num2;
         if (num - long_7 < (long)OGGStream.int_2)
         {
             num2 = long_7;
         }
         else
         {
             num2 = (long_7 + num) / 2L;
         }
         this.method_8(num2);
         num3 = this.method_0(@class, -1L);
         if (num3 == OGGStream.int_9)
         {
             return OGGStream.int_9;
         }
         if (num3 >= 0)
         {
             if (@class.method_5() == int_24)
             {
                 long_7 = (long)(num3 + @class.int_1 + @class.int_3);
                 continue;
             }
         }
         num = num2;
         if (num3 >= 0)
         {
             long_9 = (long)num3;
         }
     }
     this.method_8(long_9);
     num3 = this.method_0(@class, -1L);
     if (num3 == OGGStream.int_9)
     {
         return OGGStream.int_9;
     }
     if (long_7 < long_8)
     {
         if (num3 != -1)
         {
             num3 = this.method_13(long_9, this.long_0, long_8, @class.method_5(), int_25 + 1);
             if (num3 == OGGStream.int_9)
             {
                 return OGGStream.int_9;
             }
             goto IL_FF;
         }
     }
     this.int_20 = int_25 + 1;
     this.long_1 = new long[int_25 + 2];
     this.long_1[int_25 + 1] = long_7;
     IL_FF:
     this.long_1[int_25] = long_6;
     return 0;
 }
示例#14
0
 private int method_11()
 {
     OGGClass5 oggClass5 = new OGGClass5();
     Class47 class47_ = new Class47();
     Class48 @class = new Class48();
     int[] array = new int[1];
     int num = this.method_2(oggClass5, class47_, array, null);
     int num2 = array[0];
     int int_ = (int)this.long_0;
     this.class56_0.method_2();
     if (num == -1)
     {
         return -1;
     }
     this.bool_0 = true;
     OGGStream.smethod_0(this.fileStream, 0L, OGGStream.int_5);
     this.long_0 = OGGStream.smethod_1(this.fileStream);
     long num3 = this.long_0;
     num3 = (long)this.method_1(@class);
     if (@class.method_5() != num2)
     {
         if (this.method_13(0L, 0L, num3 + 1L, num2, 0) < 0)
         {
             this.method_22();
             return OGGStream.int_9;
         }
     }
     else if (this.method_13(0L, num3, num3 + 1L, num2, 0) < 0)
     {
         this.method_22();
         return OGGStream.int_9;
     }
     this.method_3(oggClass5, class47_, int_);
     return this.method_17(0);
 }
示例#15
0
 private int method_1(Class48 class48_0)
 {
     long num = this.long_0;
     int num2 = -1;
     int num3;
     while (num2 == -1)
     {
         num -= (long)OGGStream.int_2;
         if (num < 0L)
         {
             num = 0L;
         }
         this.method_8(num);
         while (this.long_0 < num + (long)OGGStream.int_2)
         {
             num3 = this.method_0(class48_0, num + (long)OGGStream.int_2 - this.long_0);
             if (num3 == OGGStream.int_9)
             {
                 return OGGStream.int_9;
             }
             if (num3 < 0)
             {
                 break;
             }
             num2 = num3;
         }
     }
     this.method_8((long)num2);
     num3 = this.method_0(class48_0, (long)OGGStream.int_2);
     if (num3 < 0)
     {
         return OGGStream.int_10;
     }
     return num2;
 }
示例#16
0
 private int method_0(Class48 class48_0, long long_6)
 {
     if (long_6 > 0L)
     {
         long_6 += this.long_0;
     }
     while (long_6 <= 0L || this.long_0 < long_6)
     {
         int num = this.class52_0.method_3(class48_0);
         if (num < 0)
         {
             this.long_0 -= (long)num;
         }
         else
         {
             if (num != 0)
             {
                 int result = (int)this.long_0;
                 this.long_0 += (long)num;
                 return result;
             }
             if (long_6 == 0L)
             {
                 return OGGStream.int_6;
             }
             int num2 = this.method_7();
             if (num2 == 0)
             {
                 return OGGStream.int_7;
             }
             if (num2 < 0)
             {
                 return OGGStream.int_9;
             }
         }
     }
     return OGGStream.int_6;
 }
示例#17
0
 public int method_18(long long_6)
 {
     long num = this.method_15(-1);
     if (!this.bool_0)
     {
         return -1;
     }
     if (long_6 < 0L || long_6 > num)
     {
         this.long_4 = -1L;
         this.method_5();
         return -1;
     }
     int i;
     for (i = this.int_20 - 1; i >= 0; i--)
     {
         num -= this.long_3[i];
         if (long_6 >= num)
         {
             break;
         }
     }
     long num2 = long_6 - num;
     long num3 = this.long_1[i + 1];
     long num4 = this.long_1[i];
     int int_ = (int)num4;
     Class48 @class = new Class48();
     while (num4 < num3)
     {
         long num5;
         if (num3 - num4 < (long)OGGStream.int_2)
         {
             num5 = num4;
         }
         else
         {
             num5 = (num3 + num4) / 2L;
         }
         this.method_8(num5);
         int num6 = this.method_0(@class, num3 - num5);
         if (num6 == -1)
         {
             num3 = num5;
         }
         else
         {
             long num7 = @class.method_4();
             if (num7 < num2)
             {
                 int_ = num6;
                 num4 = this.long_0;
             }
             else
             {
                 num3 = num5;
             }
         }
     }
     if (this.method_17(int_) != 0)
     {
         this.long_4 = -1L;
         this.method_5();
         return -1;
     }
     if (this.long_4 >= long_6)
     {
         this.long_4 = -1L;
         this.method_5();
         return -1;
     }
     if (long_6 > this.method_15(-1))
     {
         this.long_4 = -1L;
         this.method_5();
         return -1;
     }
     while (this.long_4 < long_6)
     {
         int num8 = (int)(long_6 - this.long_4);
         int num9 = this.oggClass1.method_3();
         if (num9 > num8)
         {
             num9 = num8;
         }
         this.oggClass1.method_6(num9);
         this.long_4 += (long)num9;
         if (num9 < num8 && this.method_6(1) == 0)
         {
             this.long_4 = this.method_15(-1);
         }
     }
     return 0;
 }
示例#18
0
        public int method_18(long long_6)
        {
            long num = this.method_15(-1);

            if (!this.bool_0)
            {
                return(-1);
            }
            if (long_6 < 0L || long_6 > num)
            {
                this.long_4 = -1L;
                this.method_5();
                return(-1);
            }
            int i;

            for (i = this.int_20 - 1; i >= 0; i--)
            {
                num -= this.long_3[i];
                if (long_6 >= num)
                {
                    break;
                }
            }
            long    num2   = long_6 - num;
            long    num3   = this.long_1[i + 1];
            long    num4   = this.long_1[i];
            int     int_   = (int)num4;
            Class48 @class = new Class48();

            while (num4 < num3)
            {
                long num5;
                if (num3 - num4 < (long)OGGStream.int_2)
                {
                    num5 = num4;
                }
                else
                {
                    num5 = (num3 + num4) / 2L;
                }
                this.method_8(num5);
                int num6 = this.method_0(@class, num3 - num5);
                if (num6 == -1)
                {
                    num3 = num5;
                }
                else
                {
                    long num7 = @class.method_4();
                    if (num7 < num2)
                    {
                        int_ = num6;
                        num4 = this.long_0;
                    }
                    else
                    {
                        num3 = num5;
                    }
                }
            }
            if (this.method_17(int_) != 0)
            {
                this.long_4 = -1L;
                this.method_5();
                return(-1);
            }
            if (this.long_4 >= long_6)
            {
                this.long_4 = -1L;
                this.method_5();
                return(-1);
            }
            if (long_6 > this.method_15(-1))
            {
                this.long_4 = -1L;
                this.method_5();
                return(-1);
            }
            while (this.long_4 < long_6)
            {
                int num8 = (int)(long_6 - this.long_4);
                int num9 = this.oggClass1.method_3();
                if (num9 > num8)
                {
                    num9 = num8;
                }
                this.oggClass1.method_6(num9);
                this.long_4 += (long)num9;
                if (num9 < num8 && this.method_6(1) == 0)
                {
                    this.long_4 = this.method_15(-1);
                }
            }
            return(0);
        }
示例#19
0
        public bool method_6(Class48 class48_0)
        {
            byte[] array = class48_0.byte_0;
            int    num   = class48_0.int_0;

            byte[] src   = class48_0.byte_1;
            int    num2  = class48_0.int_2;
            int    num3  = class48_0.int_3;
            int    i     = 0;
            int    num4  = class48_0.method_0();
            int    num5  = class48_0.method_1();
            int    num6  = class48_0.method_2();
            int    num7  = class48_0.method_3();
            long   num8  = class48_0.method_4();
            int    num9  = class48_0.method_5();
            int    num10 = class48_0.method_6();
            int    num11 = (int)(array[num + 26] & 255);
            int    num12 = this.int_7;
            int    num13 = this.int_2;

            if (num13 != 0)
            {
                this.int_1 -= num13;
                if (this.int_1 != 0)
                {
                    Buffer.BlockCopy(this.byte_0, num13, this.byte_0, 0, this.int_1);
                }
                this.int_2 = 0;
            }
            if (num12 != 0)
            {
                if (this.int_5 - num12 != 0)
                {
                    Buffer.BlockCopy(this.int_3, num12 << 2, this.int_3, 0, this.int_5 - num12 << 2);
                    Buffer.BlockCopy(this.long_0, num12 << 3, this.long_0, 0, this.int_5 - num12 << 3);
                }
                this.int_5 -= num12;
                this.int_6 -= num12;
                this.int_7  = 0;
            }
            if (num9 != this.int_11)
            {
                return(false);
            }
            if (num4 > 0)
            {
                return(false);
            }
            this.method_4(num11 + 1);
            if (num10 != this.int_12)
            {
                for (int j = this.int_6; j < this.int_5; j++)
                {
                    this.int_1 -= (this.int_3[j] & 255);
                }
                this.int_5 = this.int_6;
                if (this.int_12 != -1)
                {
                    this.int_3[this.int_5++] = 1024;
                    this.int_6++;
                }
                if (num5 != 0)
                {
                    num6 = 0;
                    while (i < num11)
                    {
                        int num14 = (int)(array[num + 27 + i] & 255);
                        num2 += num14;
                        num3 -= num14;
                        if (num14 < 255)
                        {
                            i++;
                            break;
                        }
                        i++;
                    }
                }
            }
            if (num3 != 0)
            {
                this.method_3(num3);
                Buffer.BlockCopy(src, num2, this.byte_0, this.int_1, num3);
                this.int_1 += num3;
            }
            int num15 = -1;

            while (i < num11)
            {
                int num16 = (int)(array[num + 27 + i] & 255);
                this.int_3[this.int_5]  = num16;
                this.long_0[this.int_5] = -1L;
                if (num6 != 0)
                {
                    this.int_3[this.int_5] |= 256;
                    num6 = 0;
                }
                if (num16 < 255)
                {
                    num15 = this.int_5;
                }
                this.int_5++;
                i++;
                if (num16 < 255)
                {
                    this.int_6 = this.int_5;
                }
            }
            if (num15 != -1)
            {
                this.long_0[num15] = num8;
            }
            if (num7 != 0)
            {
                this.int_9 = 1;
                if (this.int_5 > 0)
                {
                    this.int_3[this.int_5 - 1] |= 512;
                }
            }
            this.int_12 = num10 + 1;
            return(true);
        }
示例#20
0
 public bool method_6(Class48 class48_0)
 {
     byte[] array = class48_0.byte_0;
     int num = class48_0.int_0;
     byte[] src = class48_0.byte_1;
     int num2 = class48_0.int_2;
     int num3 = class48_0.int_3;
     int i = 0;
     int num4 = class48_0.method_0();
     int num5 = class48_0.method_1();
     int num6 = class48_0.method_2();
     int num7 = class48_0.method_3();
     long num8 = class48_0.method_4();
     int num9 = class48_0.method_5();
     int num10 = class48_0.method_6();
     int num11 = (int)(array[num + 26] & 255);
     int num12 = this.int_7;
     int num13 = this.int_2;
     if (num13 != 0)
     {
         this.int_1 -= num13;
         if (this.int_1 != 0)
         {
             Buffer.BlockCopy(this.byte_0, num13, this.byte_0, 0, this.int_1);
         }
         this.int_2 = 0;
     }
     if (num12 != 0)
     {
         if (this.int_5 - num12 != 0)
         {
             Buffer.BlockCopy(this.int_3, num12 << 2, this.int_3, 0, this.int_5 - num12 << 2);
             Buffer.BlockCopy(this.long_0, num12 << 3, this.long_0, 0, this.int_5 - num12 << 3);
         }
         this.int_5 -= num12;
         this.int_6 -= num12;
         this.int_7 = 0;
     }
     if (num9 != this.int_11)
     {
         return false;
     }
     if (num4 > 0)
     {
         return false;
     }
     this.method_4(num11 + 1);
     if (num10 != this.int_12)
     {
         for (int j = this.int_6; j < this.int_5; j++)
         {
             this.int_1 -= (this.int_3[j] & 255);
         }
         this.int_5 = this.int_6;
         if (this.int_12 != -1)
         {
             this.int_3[this.int_5++] = 1024;
             this.int_6++;
         }
         if (num5 != 0)
         {
             num6 = 0;
             while (i < num11)
             {
                 int num14 = (int)(array[num + 27 + i] & 255);
                 num2 += num14;
                 num3 -= num14;
                 if (num14 < 255)
                 {
                     i++;
                     break;
                 }
                 i++;
             }
         }
     }
     if (num3 != 0)
     {
         this.method_3(num3);
         Buffer.BlockCopy(src, num2, this.byte_0, this.int_1, num3);
         this.int_1 += num3;
     }
     int num15 = -1;
     while (i < num11)
     {
         int num16 = (int)(array[num + 27 + i] & 255);
         this.int_3[this.int_5] = num16;
         this.long_0[this.int_5] = -1L;
         if (num6 != 0)
         {
             this.int_3[this.int_5] |= 256;
             num6 = 0;
         }
         if (num16 < 255)
         {
             num15 = this.int_5;
         }
         this.int_5++;
         i++;
         if (num16 < 255)
         {
             this.int_6 = this.int_5;
         }
     }
     if (num15 != -1)
     {
         this.long_0[num15] = num8;
     }
     if (num7 != 0)
     {
         this.int_9 = 1;
         if (this.int_5 > 0)
         {
             this.int_3[this.int_5 - 1] |= 512;
         }
     }
     this.int_12 = num10 + 1;
     return true;
 }
示例#21
0
        public int method_3(Class48 class48_1)
        {
            int num  = this.int_2;
            int num2 = this.int_1 - this.int_2;

            if (this.int_4 == 0)
            {
                if (num2 < 27)
                {
                    return(0);
                }
                if (this.byte_0[num] == 79 && this.byte_0[num + 1] == 103 && this.byte_0[num + 2] == 103)
                {
                    if (this.byte_0[num + 3] == 83)
                    {
                        int num3 = (int)((this.byte_0[num + 26] & 255) + 27);
                        if (num2 < num3)
                        {
                            return(0);
                        }
                        for (int i = 0; i < (int)(this.byte_0[num + 26] & 255); i++)
                        {
                            this.int_5 += (int)(this.byte_0[num + 27 + i] & 255);
                        }
                        this.int_4 = num3;
                        goto IL_11E;
                    }
                }
                this.int_4 = 0;
                this.int_5 = 0;
                int num4 = 0;
                for (int j = 0; j < num2 - 1; j++)
                {
                    if (this.byte_0[num + 1 + j] == 79)
                    {
                        num4 = num + 1 + j;
                        goto IL_108;
                    }
                }
IL_108:
                if (num4 == 0)
                {
                    num4 = this.int_1;
                }
                this.int_2 = num4;
                return(-(num4 - num));
            }
IL_11E:
            if (this.int_5 + this.int_4 > num2)
            {
                return(0);
            }
            lock (this.byte_1)
            {
                Buffer.BlockCopy(this.byte_0, num + 22, this.byte_1, 0, 4);
                this.byte_0[num + 22] = 0;
                this.byte_0[num + 23] = 0;
                this.byte_0[num + 24] = 0;
                this.byte_0[num + 25] = 0;
                Class48 @class = this.class48_0;
                @class.byte_0 = this.byte_0;
                @class.int_0  = num;
                @class.int_1  = this.int_4;
                @class.byte_1 = this.byte_0;
                @class.int_2  = num + this.int_4;
                @class.int_3  = this.int_5;
                @class.method_7();
                if (this.byte_1[0] == this.byte_0[num + 22] && this.byte_1[1] == this.byte_0[num + 23] && this.byte_1[2] == this.byte_0[num + 24])
                {
                    if (this.byte_1[3] == this.byte_0[num + 25])
                    {
                        goto IL_2B0;
                    }
                }
                Buffer.BlockCopy(this.byte_1, 0, this.byte_0, num + 22, 4);
                this.int_4 = 0;
                this.int_5 = 0;
                int num4 = 0;
                for (int k = 0; k < num2 - 1; k++)
                {
                    if (this.byte_0[num + 1 + k] == 79)
                    {
                        num4 = num + 1 + k;
                        goto IL_28C;
                    }
                }
IL_28C:
                if (num4 == 0)
                {
                    num4 = this.int_1;
                }
                this.int_2 = num4;
                return(-(num4 - num));
            }
IL_2B0:
            num = this.int_2;
            if (class48_1 != null)
            {
                class48_1.byte_0 = this.byte_0;
                class48_1.int_0  = num;
                class48_1.int_1  = this.int_4;
                class48_1.byte_1 = this.byte_0;
                class48_1.int_2  = num + this.int_4;
                class48_1.int_3  = this.int_5;
            }
            this.int_3  = 0;
            this.int_2 += (num2 = this.int_4 + this.int_5);
            this.int_4  = 0;
            this.int_5  = 0;
            return(num2);
        }