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