示例#1
0
        // Token: 0x060001F9 RID: 505 RVA: 0x00008320 File Offset: 0x00006520
        private static object parseBinaryArray(int objRef)
        {
            List <object> list  = new List <object>();
            List <int>    list2 = new List <int>();
            byte          b     = Plist.objectTable[Plist.offsetTable[objRef]];
            int           num;
            int           count = Plist.getCount(Plist.offsetTable[objRef], ref num);

            checked
            {
                if (count < 15)
                {
                    num = Plist.offsetTable[objRef] + 1;
                }
                else
                {
                    num = Plist.offsetTable[objRef] + 2 + Plist.RegulateNullBytes(BitConverter.GetBytes(count), 1).Length;
                }
                int i;
                for (i = num; i < num + count * Plist.objRefSize; i += Plist.objRefSize)
                {
                    byte[] array = Plist.objectTable.GetRange(i, Plist.objRefSize).ToArray();
                    Array.Reverse(array);
                    list2.Add(BitConverter.ToInt32(Plist.RegulateNullBytes(array, 4), 0));
                }
                i = 0;
                while (i < count)
                {
                    list.Add(RuntimeHelpers.GetObjectValue(Plist.parseBinary(list2[i])));
                    Math.Max(Interlocked.Increment(ref i), i - 1);
                }
                return(list);
            }
        }
示例#2
0
        // Token: 0x06000201 RID: 513 RVA: 0x00008754 File Offset: 0x00006954
        private static object parseBinaryUnicodeString(int headerPosition)
        {
            int num2;
            int num = Plist.getCount(headerPosition, ref num2);

            checked
            {
                num *= 2;
                byte[] array = new byte[num - 1 + 1];
                for (int i = 0; i < num; i += 2)
                {
                    byte b  = Plist.objectTable.GetRange(num2 + i, 1)[0];
                    byte b2 = Plist.objectTable.GetRange(num2 + i + 1, 1)[0];
                    if (BitConverter.IsLittleEndian)
                    {
                        array[i]     = b2;
                        array[i + 1] = b;
                    }
                    else
                    {
                        array[i]     = b;
                        array[i + 1] = b2;
                    }
                }
                return(Encoding.Unicode.GetString(array));
            }
        }
示例#3
0
        // Token: 0x06000202 RID: 514 RVA: 0x000087E8 File Offset: 0x000069E8
        private static object parseBinaryByteArray(int headerPosition)
        {
            int index;
            int count = Plist.getCount(headerPosition, ref index);

            return(Plist.objectTable.GetRange(index, count).ToArray());
        }
示例#4
0
        // Token: 0x06000200 RID: 512 RVA: 0x0000870C File Offset: 0x0000690C
        private static object parseBinaryAsciiString(int headerPosition)
        {
            int         index;
            int         count = Plist.getCount(headerPosition, ref index);
            List <byte> range = Plist.objectTable.GetRange(index, count);

            return((range.Count > 0) ? Encoding.ASCII.GetString(range.ToArray()) : string.Empty);
        }