Beispiel #1
0
    private MemoryStream method_10(uint A_0, int A_1, int A_2, bool A_3)
    {
        bool flag;

        A_2 = Math.Min(A_1, A_2);
        MemoryStream stream = new MemoryStream(A_2);

        stream.SetLength((long)A_2);
        if (!(flag = A_3 || this.class522_0.method_2((long)A_1)))
        {
            Class1090 class2 = this.class410_0.method_0(0);
            if ((class2.uint_4 != uint.MaxValue) && (this.memoryStream_0 == null))
            {
                this.memoryStream_0 = this.method_10(class2.uint_4, (int)class2.long_2, (int)class2.long_2, true);
            }
            if ((this.class522_0.method_0() == 0) || (this.memoryStream_0 == null))
            {
                stream.SetLength(0L);
                return(stream);
            }
        }
        Class916 class3   = flag ? this.class917_0 : this.class916_0;
        Stream   stream2  = flag ? this.stream_0 : this.memoryStream_0;
        int      num6     = flag ? 0x200 : 0x40;
        int      offset   = 0;
        long     position = stream2.Position;

        for (uint i = A_0; i != 0xfffffffe; i = class3.method_0(i))
        {
            if (i == uint.MaxValue)
            {
                return(stream);
            }
            long num2 = Class967.smethod_0(i, flag);
            if (position != num2)
            {
                stream2.Position = position = num2;
            }
            int num5 = A_2 - offset;
            if (num5 == 0)
            {
                return(stream);
            }
            int count = Math.Min(num6, num5);
            stream2.Read(stream.GetBuffer(), offset, count);
            offset   += count;
            position += count;
        }
        return(stream);
    }
Beispiel #2
0
    internal void method_6()
    {
        Class916 class2 = Class523.smethod_0(this.stream_0, this.class522_0.int_6, this.class522_0.uint_1, this.class522_0.int_4);

        byte[]       buffer = new byte[0x200];
        BinaryReader reader = new BinaryReader(new MemoryStream(buffer), Encoding.Unicode);

        for (uint i = 0; i < this.class522_0.int_6; i++)
        {
            this.stream_0.Position = Class967.smethod_0(class2.method_0(i), true);
            this.stream_0.Read(buffer, 0, 0x200);
            reader.BaseStream.Position = 0L;
            for (int j = 0; j < 0x80; j++)
            {
                base.method_5(reader.ReadUInt32());
            }
        }
    }