示例#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 static string smethod_5(BinaryReader A_0)
    {
        int count = A_0.ReadInt32();

        byte[] bytes = A_0.ReadBytes(count);
        Class567.smethod_6(A_0.BaseStream, 4);
        return(Encoding.UTF8.GetString(bytes));
    }
示例#3
0
 private static string smethod_11(BinaryReader A_0, int A_1)
 {
     if (A_1 == 0x4b0)
     {
         string str = smethod_9(A_0);
         Class567.smethod_6(A_0.BaseStream, 4);
         return(str);
     }
     return(smethod_7(A_0, A_1));
 }
示例#4
0
 private static void smethod_12(BinaryWriter A_0, string A_1, int A_2)
 {
     if (A_2 == 0x4b0)
     {
         smethod_10(A_0, A_1);
         Class567.smethod_6(A_0.BaseStream, 4);
     }
     else
     {
         smethod_8(A_0, A_1, A_2);
     }
 }
示例#5
0
    private static void smethod_6(BinaryWriter A_0, object A_1, int A_2, bool A_3)
    {
        int num = 0x11;

        if (A_1 is string)
        {
            if (A_2 == 0x4b0)
            {
                A_0.Write(0x1f);
            }
            else
            {
                A_0.Write(30);
            }
            smethod_12(A_0, (string)A_1, A_2);
        }
        else if (A_1 is short)
        {
            A_0.Write(2);
            A_0.Write((short)A_1);
        }
        else if (A_1 is int)
        {
            A_0.Write(3);
            A_0.Write((int)A_1);
        }
        else if (A_1 is uint)
        {
            A_0.Write(0x13);
            A_0.Write((uint)A_1);
        }
        else if (A_1 is double)
        {
            A_0.Write(5);
            A_0.Write((double)A_1);
        }
        else if (A_1 is bool)
        {
            A_0.Write(11);
            bool flag = (bool)A_1;
            A_0.Write(flag ? ((short)(-1)) : ((short)0));
        }
        else if (A_1 is DateTime)
        {
            A_0.Write(0x40);
            DateTime time = (DateTime)A_1;
            if (time != DateTime.MinValue)
            {
                A_0.Write(smethod_14(time, BookmarkStart.b("匶堸伺堼款⡀⹂⁄", num)));
            }
            else
            {
                A_0.Write((long)0L);
            }
        }
        else if (A_1 is byte[])
        {
            A_0.Write(0x41);
            byte[] buffer = (byte[])A_1;
            A_0.Write(buffer.Length);
            A_0.Write(buffer);
        }
        else if (A_1 is string[])
        {
            if (A_2 == 0x4b0)
            {
                A_0.Write(0x101f);
            }
            else
            {
                A_0.Write(0x101e);
            }
            string[] strArray2 = (string[])A_1;
            A_0.Write(strArray2.Length);
            foreach (string str in strArray2)
            {
                smethod_12(A_0, str, A_2);
            }
        }
        else
        {
            if (!(A_1 is object[]))
            {
                throw new NotSupportedException(BookmarkStart.b("挶ᤸ䬺似倾ㅀ♂㝄㍆え歊㭌⹎㵐♒ご睖㙘㵚絜⭞ॠ੢ᙤ䝦ᵨቪᵬ੮兰ၲᑴ᥶奸ᕺቼ୾ꆀꞆ愈ﺊﶌホﺐﶘ떚", num));
            }
            A_0.Write(0x100c);
            object[] objArray = (object[])A_1;
            A_0.Write(objArray.Length);
            foreach (object obj2 in objArray)
            {
                smethod_6(A_0, obj2, A_2, false);
            }
        }
        if (A_3)
        {
            Class567.smethod_6(A_0.BaseStream, 4);
        }
    }
示例#6
0
    private static object smethod_3(BinaryReader A_0, int A_1)
    {
        int num = 12;

        switch (((VarEnum)A_0.ReadInt32()))
        {
        case VarEnum.VT_I2:
            return(A_0.ReadInt16());

        case VarEnum.VT_I4:
            return(A_0.ReadInt32());

        case VarEnum.VT_R8:
            return(A_0.ReadDouble());

        case VarEnum.VT_BOOL:
            return(A_0.ReadInt16() != 0);

        case VarEnum.VT_UI4:
            return(A_0.ReadUInt32());

        case VarEnum.VT_LPSTR:
            return(smethod_7(A_0, A_1));

        case VarEnum.VT_LPWSTR:
        {
            string str = smethod_9(A_0);
            Class567.smethod_6(A_0.BaseStream, 4);
            return(str);
        }

        case VarEnum.VT_FILETIME:
        {
            long num2 = A_0.ReadInt64();
            if ((num2 <= DateTime.MinValue.Ticks) || (num2 > DateTime.MaxValue.Ticks))
            {
                return(DateTime.MinValue);
            }
            return(smethod_13(num2, BookmarkStart.b("䘱崳唵匷䤹", num)));
        }

        case VarEnum.VT_BLOB:
        {
            int count = A_0.ReadInt32();
            return(A_0.ReadBytes(count));
        }

        case (VarEnum.VT_VECTOR | VarEnum.VT_LPSTR):
        {
            int num4 = (A_1 != 0x4b0) ? A_1 : 0x4e4;
            return(smethod_4(A_0, num4));
        }

        case (VarEnum.VT_VECTOR | VarEnum.VT_LPWSTR):
            return(smethod_4(A_0, A_1));

        case (VarEnum.VT_VECTOR | VarEnum.VT_VARIANT):
            return(smethod_5(A_0, A_1));
        }
        return(null);
    }