예제 #1
0
 private bool method_11(BinaryStream binaryStream_2, int int_5)
 {
     if (this.int_2 == 0)
     {
         return(false);
     }
     if (this.int_1 > 0)
     {
         int num = Math.Min(this.int_1, this.int_2);
         GClass879.smethod_0(binaryStream_2, this.method_6(), num);
         this.int_1 -= num;
         this.int_2 -= num;
         this.int_0 += num;
     }
     return(this.int_1 == 0);
 }
예제 #2
0
    public static IEnumerable <IntPtr> smethod_0(GClass874 gclass874_0, GClass876.GStruct3 gstruct3_0, byte[] byte_0)
    {
        goto IL_23;
        for (;;)
        {
            IEnumerator <int> enumerator;
            long   pos;
            long   left;
            long   toRead;
            IntPtr from;
            try
            {
IL_133:
                if (!enumerator.MoveNext())
                {
                    goto JumpOutOfTryFinally - 3;
                }
                goto IL_1A1;
IL_23:
                int bufferSize = (int)Math.Min(gstruct3_0.long_0, (long)Math.Max(1048576, byte_0.Length * 4));
                byte[] buf = new byte[bufferSize];
                pos  = 0L;
                left = gstruct3_0.long_0;
                GClass879 kmp = new GClass879(byte_0);
                Debug.WriteLine(gstruct3_0.long_0);
                goto IL_18B;
IL_B2:
                toRead = Math.Min((long)bufferSize, left);
                from   = (IntPtr)((long)gstruct3_0.intptr_0 + pos);
                if (!gclass874_0.method_8(from, buf, (int)toRead))
                {
                    goto IL_1D1;
                }
                enumerator = kmp.method_4(buf).GetEnumerator();
                goto IL_133;
            }
            finally
            {
                if (enumerator != null)
                {
                    enumerator.Dispose();
                }
            }
            goto JumpOutOfTryFinally - 3;
IL_18B:
            if (left <= 0L)
            {
                break;
            }
            goto IL_B2;
IL_1A1:
            int num = enumerator.Current;
            yield return(new IntPtr((long)from + (long)num));

            continue;
            JumpOutOfTryFinally - 3 :
            enumerator = null;
            left      -= toRead;
            pos       += toRead;
            pos       -= (long)(byte_0.Length - 1);
            goto IL_18B;
        }
IL_1D1:
        yield break;
        yield break;
    }