Beispiel #1
0
    private void method_4(Stream A_0)
    {
        Class1115.smethod_4(A_0, 0xfffe);
        Class1115.smethod_3(A_0, 0x105);
        Class1115.smethod_3(A_0, 2);
        for (int i = 0; i < 0x10; i++)
        {
            A_0.WriteByte(0);
        }
        int count = this.list_0.Count;

        Class1115.smethod_4(A_0, count);
        List <long> list = new List <long>();

        for (int j = 0; j < count; j++)
        {
            Class663 class3 = this.list_0[j];
            byte[]   buffer = class3.method_2().ToByteArray();
            A_0.Write(buffer, 0, buffer.Length);
            list.Add(A_0.Position);
            Class1115.smethod_4(A_0, 0);
        }
        for (int k = 0; k < count; k++)
        {
            Class663 class2   = this.list_0[k];
            long     position = A_0.Position;
            A_0.Position = list[k];
            Class1115.smethod_4(A_0, (int)position);
            A_0.Position = position;
            class2.method_11(A_0);
        }
    }
Beispiel #2
0
    private int method_10(Stream A_0, object A_1)
    {
        PropertyType @bool;

        if (A_1 is int)
        {
            @bool = PropertyType.Int32;
        }
        else if (A_1 is double)
        {
            @bool = PropertyType.Double;
        }
        else if (A_1 is bool)
        {
            @bool = PropertyType.Bool;
        }
        else
        {
            if (!(A_1 is string))
            {
                throw new NotImplementedException();
            }
            @bool = PropertyType.String;
        }
        Class1115.smethod_4(A_0, (int)@bool);
        return(this.method_14(A_0, A_1, @bool) + 4);
    }
Beispiel #3
0
    private object method_9(Stream A_0, int A_1)
    {
        byte[]       buffer = new byte[4];
        PropertyType type   = (PropertyType)Class1115.smethod_1(A_0, buffer);

        return(this.method_5(type, A_0, A_1 - 4));
    }
        public void Parse(Stream stream)
        {
            byte[] buffer = new byte[4];
            int    count  = Class1115.smethod_1(stream, buffer);

            this.Format = Class1115.smethod_1(stream, buffer);
            this.Data   = new byte[count];
            stream.Read(this.Data, 0, count);
        }
Beispiel #5
0
    private int method_15(Stream A_0, byte[] A_1)
    {
        int num    = 0;
        int length = A_1.Length;

        num = 0 + Class1115.smethod_4(A_0, length);
        A_0.Write(A_1, 0, length);
        return(num + length);
    }
        public int Serialize(Stream stream)
        {
            int num    = 0;
            int length = this.Data.Length;

            num  = 0 + Class1115.smethod_4(stream, length);
            num += Class1115.smethod_4(stream, this.Format);
            stream.Write(this.Data, 0, length);
            return(num + length);
        }
Beispiel #7
0
    private object method_6(Stream A_0, byte[] A_1)
    {
        int count = Class1115.smethod_1(A_0, A_1);

        byte[] buffer = new byte[count];
        if (A_0.Read(buffer, 0, count) != count)
        {
            throw new Exception();
        }
        return(buffer);
    }
Beispiel #8
0
    private IList method_3(Stream A_0, int A_1)
    {
        byte[]       buffer = new byte[4];
        int          num    = Class1115.smethod_1(A_0, buffer);
        PropertyType type   = this.propertyType_0 & ~PropertyType.Vector;
        IList        list   = this.method_4(type, num);

        for (int i = 0; i < num; i++)
        {
            list[i] = this.method_5(type, A_0, A_1 - 4);
        }
        return(list);
    }
Beispiel #9
0
    private int method_12(Stream A_0, Dictionary <int, string> A_1)
    {
        int num   = 0;
        int count = A_1.Count;

        num = 0 + Class1115.smethod_4(A_0, count);
        foreach (KeyValuePair <int, string> pair in A_1)
        {
            num += Class1115.smethod_4(A_0, pair.Key);
            num += Class1115.smethod_8(A_0, pair.Value);
        }
        return(num);
    }
Beispiel #10
0
    private Dictionary <int, string> method_10(Stream A_0)
    {
        byte[] buffer = new byte[4];
        int    num    = Class1115.smethod_1(A_0, buffer);
        Dictionary <int, string> dictionary = new Dictionary <int, string>();

        for (int i = 0; i < num; i++)
        {
            int    key = Class1115.smethod_1(A_0, buffer);
            string str = Class1115.smethod_6(A_0, -1);
            dictionary.Add(key, str);
        }
        return(dictionary);
    }
Beispiel #11
0
    private int method_13(Stream A_0, IList A_1)
    {
        int count = A_1.Count;

        Class1115.smethod_4(A_0, count);
        int          num2 = 4;
        PropertyType type = this.propertyType_0 & ~PropertyType.Vector;

        for (int i = 0; i < count; i++)
        {
            num2 += this.method_14(A_0, A_1[i], type);
        }
        return(num2);
    }
Beispiel #12
0
    private object method_5(PropertyType A_0, Stream A_1, int A_2)
    {
        byte[] buffer = new byte[8];
        object obj2   = null;

        switch (A_0)
        {
        case PropertyType.Empty:
        case PropertyType.Null:
            return(null);

        case PropertyType.Int16:
            obj2          = Class1115.smethod_0(A_1, buffer);
            A_1.Position += 2L;
            return(obj2);

        case PropertyType.Int32:
        case PropertyType.Int:
            return(Class1115.smethod_1(A_1, buffer));

        case PropertyType.Double:
            return(Class1115.smethod_2(A_1, buffer));

        case PropertyType.Bool:
            return(Class1115.smethod_1(A_1, buffer) != 0);

        case PropertyType.Object:
            return(this.method_9(A_1, A_2 - 4));

        case PropertyType.UInt32:
            return((uint)Class1115.smethod_0(A_1, buffer));

        case PropertyType.AsciiString:
            return(Class1115.smethod_6(A_1, A_2 - 4));

        case PropertyType.String:
            return(Class1115.smethod_7(A_1, A_2 - 4));

        case PropertyType.DateTime:
            return(this.method_8(A_1, buffer));

        case PropertyType.Blob:
            return(this.method_6(A_1, buffer));

        case PropertyType.ClipboardData:
            return(this.method_7(A_1, buffer));
        }
        throw new NotImplementedException();
    }
Beispiel #13
0
 public void method_2(Stream A_0, int A_1)
 {
     byte[] buffer = new byte[4];
     this.propertyType_0 = (PropertyType)Class1115.smethod_1(A_0, buffer);
     if ((this.propertyType_0 & PropertyType.Vector) != PropertyType.Empty)
     {
         this.object_0 = this.method_3(A_0, A_1);
     }
     else
     {
         this.object_0 = this.method_5(this.propertyType_0, A_0, A_1);
     }
     if ((this.propertyType_0 & PropertyType.AsciiString) == PropertyType.AsciiString)
     {
         this.propertyType_0 &= ~PropertyType.AsciiString;
         this.propertyType_0 |= PropertyType.String;
     }
 }
Beispiel #14
0
    public void method_11(Stream A_0)
    {
        this.int_1 = (int)A_0.Position;
        Class1115.smethod_4(A_0, 0);
        Dictionary <int, string> dictionary = this.method_12();

        new Class937(1)
        {
            propertyType_0 = PropertyType.Int16
        }.method_16((dictionary.Count == 0) ? ((short)0x4e3) : ((short)(-535)));
        for (int i = this.list_0.Count - 1; i >= 0; i--)
        {
            Class937 local1 = this.list_0[i];
        }
        int count = this.list_0.Count;

        Class1115.smethod_4(A_0, count);
        A_0.Position += (count * 4) * 2;
        List <int> list = new List <int>();

        for (int j = 0; j < count; j++)
        {
            Class937 class3 = this.list_0[j];
            list.Add((int)A_0.Position);
            class3.method_11(A_0);
        }
        long position = A_0.Position;

        A_0.Position = this.int_1 + 8;
        int num4 = 0;
        int num5 = list.Count;

        while (num4 < num5)
        {
            int num6 = list[num4] - this.int_1;
            Class1115.smethod_4(A_0, this.list_0[num4].Interface37.imethod_3());
            Class1115.smethod_4(A_0, num6);
            num4++;
        }
        this.int_2   = ((int)position) - this.int_1;
        A_0.Position = this.int_1;
        Class1115.smethod_4(A_0, this.int_2);
        A_0.Position = position;
    }
Beispiel #15
0
    public void method_8(Stream A_0)
    {
        byte[] buffer = new byte[4];
        A_0.Position = this.int_1;
        this.int_2   = Class1115.smethod_1(A_0, buffer);
        int        num  = Class1115.smethod_1(A_0, buffer);
        List <int> list = new List <int>();

        for (int i = 0; i < num; i++)
        {
            int num5 = Class1115.smethod_1(A_0, buffer);
            int item = Class1115.smethod_1(A_0, buffer);
            this.list_0.Add(new Class937(num5));
            list.Add(item);
        }
        list.Add((int)A_0.Length);
        Dictionary <int, string> dictionary = null;

        for (int j = 0; j < num; j++)
        {
            Class937 class2 = this.list_0[j];
            int      num7   = list[j];
            int      num8   = list[j + 1];
            A_0.Position = this.int_1 + list[j];
            int num3 = num8 - num7;
            if (class2.Interface37.imethod_3() < 2)
            {
                this.method_9(class2, A_0, num3, ref dictionary);
                this.list_0.RemoveAt(j);
                list.RemoveAt(j);
                num--;
                j--;
            }
            else
            {
                string str;
                class2.method_2(A_0, num3);
                if ((dictionary != null) && dictionary.TryGetValue(class2.Interface37.imethod_3(), out str))
                {
                    class2.method_18(str);
                }
            }
        }
    }
Beispiel #16
0
    private void method_2(Stream A_0)
    {
        byte[] buffer = new byte[0x10];
        A_0.Read(buffer, 0, 4);
        if (BitConverter.ToInt32(buffer, 0) != 0xfffe)
        {
            throw new IOException();
        }
        A_0.Read(buffer, 0, 2);
        A_0.Read(buffer, 0, 2);
        A_0.Read(buffer, 0, 0x10);
        A_0.Read(buffer, 0, 4);
        int num4 = BitConverter.ToInt32(buffer, 0);

        for (int i = 0; i < num4; i++)
        {
            A_0.Read(buffer, 0, 0x10);
            Guid guid = new Guid(buffer);
            int  num2 = Class1115.smethod_1(A_0, buffer);
            this.list_0.Add(new Class663(guid, num2));
        }
    }
Beispiel #17
0
    public int method_11(Stream A_0)
    {
        int num = Class1115.smethod_4(A_0, (int)this.propertyType_0);

        if ((this.propertyType_0 & PropertyType.Vector) == PropertyType.Vector)
        {
            num += this.method_13(A_0, (IList)this.object_0);
        }
        else if (this.Interface37.imethod_3() == 0)
        {
            if (this.object_0 != null)
            {
                A_0.Position -= 4L;
                num          += this.method_12(A_0, (Dictionary <int, string>) this.object_0);
            }
        }
        else
        {
            num += this.method_14(A_0, this.object_0, this.propertyType_0);
        }
        Class1115.smethod_11(A_0, ref num);
        return(num);
    }
Beispiel #18
0
    private int method_14(Stream A_0, object A_1, PropertyType A_2)
    {
        int num = 0;

        switch (A_2)
        {
        case PropertyType.Empty:
        case PropertyType.Null:
            return(num);

        case PropertyType.Int16:
            return(num + Class1115.smethod_3(A_0, (short)A_1));

        case PropertyType.Int32:
        case PropertyType.Int:
            return(num + Class1115.smethod_4(A_0, (int)A_1));

        case PropertyType.Double:
            return(num + Class1115.smethod_5(A_0, (double)A_1));

        case PropertyType.Bool:
        {
            bool flag = (bool)A_1;
            return(num + Class1115.smethod_4(A_0, flag ? 1 : 0));
        }

        case PropertyType.Object:
            return(num + this.method_10(A_0, A_1));

        case PropertyType.UInt32:
            return(num + Class1115.smethod_4(A_0, (int)((uint)A_1)));

        case PropertyType.AsciiString:
            return(num + Class1115.smethod_8(A_0, (string)A_1));

        case PropertyType.String:
            return(num + Class1115.smethod_9(A_0, (string)A_1));

        case PropertyType.DateTime:
        {
            DateTime time;
            if (A_1 is TimeSpan)
            {
                TimeSpan span = (TimeSpan)A_1;
                time = DateTime.FromBinary(span.Ticks);
            }
            else
            {
                time = (DateTime)A_1;
            }
            if (this.Interface37.imethod_3() != 10)
            {
                time = time.ToUniversalTime();
            }
            ulong  num2  = (ulong)(time.Ticks - 0x701ce1722770000L);
            byte[] bytes = BitConverter.GetBytes(num2);
            A_0.Write(bytes, 0, bytes.Length);
            return(num + bytes.Length);
        }

        case PropertyType.Blob:
        {
            byte[] buffer = (byte[])A_1;
            return(num + this.method_15(A_0, buffer));
        }
        }
        throw new NotImplementedException();
    }