private static object parseBinaryByteArray(int headerPosition) { int newBytePosition; int count = Plist.getCount(headerPosition, out newBytePosition); return((object)Plist.objectTable.GetRange(newBytePosition, count).ToArray()); }
// Token: 0x06000122 RID: 290 RVA: 0x00007EC0 File Offset: 0x000060C0 private static object parseBinaryDictionary(int objRef) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); List <int> list = new List <int>(); int num; int count = Plist.getCount(Plist.offsetTable[objRef], out num); if (count < 15) { num = Plist.offsetTable[objRef] + 1; } else { num = Plist.offsetTable[objRef] + 2 + Plist.RegulateNullBytes(BitConverter.GetBytes(count), 1).Length; } for (int i = num; i < num + count * 2 * Plist.objRefSize; i += Plist.objRefSize) { byte[] array = Plist.objectTable.GetRange(i, Plist.objRefSize).ToArray(); Array.Reverse(array); list.Add(BitConverter.ToInt32(Plist.RegulateNullBytes(array, 4), 0)); } for (int i = 0; i < count; i++) { dictionary.Add((string)Plist.parseBinary(list[i]), Plist.parseBinary(list[i + count])); } return(dictionary); }
private static object parseBinaryUnicodeString(int headerPosition) { int newBytePosition; int length = Plist.getCount(headerPosition, out newBytePosition) * 2; byte[] bytes = new byte[length]; int index = 0; while (index < length) { byte num1 = Plist.objectTable.GetRange(newBytePosition + index, 1)[0]; byte num2 = Plist.objectTable.GetRange(newBytePosition + index + 1, 1)[0]; if (BitConverter.IsLittleEndian) { bytes[index] = num2; bytes[index + 1] = num1; } else { bytes[index] = num1; bytes[index + 1] = num2; } index += 2; } return((object)Encoding.Unicode.GetString(bytes)); }
// Token: 0x0600012C RID: 300 RVA: 0x00008428 File Offset: 0x00006628 private static object parseBinaryByteArray(int headerPosition) { int index; int count = Plist.getCount(headerPosition, out index); return(Plist.objectTable.GetRange(index, count).ToArray()); }
// Token: 0x0600012A RID: 298 RVA: 0x00008348 File Offset: 0x00006548 private static object parseBinaryAsciiString(int headerPosition) { int index; int count = Plist.getCount(headerPosition, out index); List <byte> range = Plist.objectTable.GetRange(index, count); return((range.Count > 0) ? Encoding.ASCII.GetString(range.ToArray()) : string.Empty); }
private static object parseBinaryAsciiString(int headerPosition) { int newBytePosition; int count = Plist.getCount(headerPosition, out newBytePosition); List <byte> range = Plist.objectTable.GetRange(newBytePosition, count); if (range.Count <= 0) { return((object)string.Empty); } return((object)Encoding.ASCII.GetString(range.ToArray())); }
private static object parseBinaryArray(int objRef) { List <object> objectList = new List <object>(); List <int> intList = new List <int>(); int num1 = (int)Plist.objectTable[Plist.offsetTable[objRef]]; int newBytePosition; int count = Plist.getCount(Plist.offsetTable[objRef], out newBytePosition); int num2 = count >= 15 ? Plist.offsetTable[objRef] + 2 + Plist.RegulateNullBytes(BitConverter.GetBytes(count), 1).Length : Plist.offsetTable[objRef] + 1; int index1 = num2; while (index1 < num2 + count * Plist.objRefSize) { byte[] array = Plist.objectTable.GetRange(index1, Plist.objRefSize).ToArray(); Array.Reverse((Array)array); intList.Add(BitConverter.ToInt32(Plist.RegulateNullBytes(array, 4), 0)); index1 += Plist.objRefSize; } for (int index2 = 0; index2 < count; ++index2) { objectList.Add(Plist.parseBinary(intList[index2])); } return((object)objectList); }
// Token: 0x0600012B RID: 299 RVA: 0x00008390 File Offset: 0x00006590 private static object parseBinaryUnicodeString(int headerPosition) { int num2; int num = Plist.getCount(headerPosition, out num2); num *= 2; byte[] array = new byte[num]; 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)); }