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; }
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); }
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; } }
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); }
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; }