예제 #1
0
    private uint method_7(Stream A_0, bool A_1, out int A_2)
    {
        bool flag;

        A_2 = 0;
        if (A_0.Length == 0L)
        {
            return(0xfffffffe);
        }
        Class916 class2 = (flag = this.class522_0.method_2(A_0.Length) || A_1) ? this.class917_0 : this.class916_0;
        Stream   stream = flag ? this.stream_0 : this.memoryStream_0;
        int      num3   = flag ? 0x200 : 0x40;
        uint     num    = Class967.smethod_1(stream.Position, flag);

        A_0.Position = 0L;
        Class567.smethod_8(A_0, stream);
        Class567.smethod_6(stream, num3);
        A_2 = Class567.smethod_4(A_0.Length, num3);
        for (uint i = 1; i < ((long)A_2); i++)
        {
            class2.method_5(num + i);
        }
        class2.method_5(0xfffffffe);
        return(num);
    }
예제 #2
0
 private void method_2(Stream A_0)
 {
     this.stream_0          = A_0;
     this.stream_0.Position = 0L;
     this.class522_0        = new Class522(new BinaryReader(this.stream_0, Encoding.Unicode));
     this.class917_0        = new Class917(this.stream_0, this.class522_0);
     this.class917_0.method_6();
     this.method_3();
     this.class916_0 = new Class916(this.method_10(this.class522_0.uint_3, this.class522_0.method_0(), this.class522_0.method_0(), true));
     this.method_9();
 }
예제 #3
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);
    }
예제 #4
0
    public void method_5(Stream A_0)
    {
        if (A_0 == null)
        {
            throw new ArgumentNullException();
        }
        Stream stream = null;

        if (!A_0.CanSeek)
        {
            stream = A_0;
            A_0    = new MemoryStream();
        }
        this.stream_0          = A_0;
        this.stream_0.Position = 0x200L;
        this.class522_0        = new Class522();
        this.class917_0        = new Class917(this.stream_0, this.class522_0);
        this.class916_0        = new Class916();
        this.memoryStream_0    = new MemoryStream();
        this.class410_0        = new Class410();
        this.method_6(this.class1089_0, null);
        if (this.memoryStream_0.Length > 0L)
        {
            int num;
            this.class410_0.method_0(0).uint_4 = this.method_8(this.memoryStream_0, true);
            this.class410_0.method_0(0).long_2 = this.memoryStream_0.Length;
            this.class522_0.uint_3             = this.method_7(this.class916_0.method_4(), true, out num);
            this.class522_0.int_7 = num;
        }
        else
        {
            this.class522_0.uint_3 = 0xfffffffe;
        }
        this.class522_0.uint_2 = this.method_8(this.class410_0.method_7(), true);
        this.class917_0.method_8();
        this.stream_0.Position = 0L;
        this.class522_0.method_1(new BinaryWriter(this.stream_0, Encoding.Unicode));
        this.stream_0.Position = this.stream_0.Length;
        if (stream != null)
        {
            A_0.Position = 0L;
            ((MemoryStream)A_0).WriteTo(stream);
            A_0.Close();
            A_0 = stream;
        }
    }
예제 #5
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());
            }
        }
    }