// Token: 0x06000125 RID: 293 RVA: 0x00007910 File Offset: 0x00005B10 private bool ReadDataEntriesFromOffsets(ulong Offset) { if (this.DataArray[(int)((uint)Offset)] == 13) { int num = Convert.ToInt32(decimal.Subtract(new decimal(this.ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 3m)), 2)), 1m)); int num2 = 0; if (this.SqlRows != null) { num2 = this.SqlRows.Length; this.SqlRows = (ROW[])Utils.CopyArray(this.SqlRows, new ROW[this.SqlRows.Length + num + 1]); } else { this.SqlRows = new ROW[num + 1]; } int num3 = num; for (int i = 0; i <= num3; i++) { SZ[] array = null; ulong num4 = this.ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 8m), new decimal(i * 2))), 2); if (decimal.Compare(new decimal(Offset), 100m) != 0) { num4 += Offset; } int num5 = this.GetValues((int)num4); this.CalcVertical((int)num4, num5); int num6 = this.GetValues(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), decimal.Subtract(new decimal(num5), new decimal(num4))), 1m))); this.SqlRows[num2 + i].ID = this.CalcVertical(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), decimal.Subtract(new decimal(num5), new decimal(num4))), 1m)), num6); num4 = Convert.ToUInt64(decimal.Add(decimal.Add(new decimal(num4), decimal.Subtract(new decimal(num6), new decimal(num4))), 1m)); num5 = this.GetValues((int)num4); num6 = num5; long num7 = this.CalcVertical((int)num4, num5); long num8 = Convert.ToInt64(decimal.Add(decimal.Subtract(new decimal(num4), new decimal(num5)), 1m)); int num9 = 0; while (num8 < num7) { array = (SZ[])Utils.CopyArray(array, new SZ[num9 + 1]); num5 = num6 + 1; num6 = this.GetValues(num5); array[num9].Type = this.CalcVertical(num5, num6); if (array[num9].Type > 9L) { array[num9].Size = (CNT.ItIsOdd(array[num9].Type) ? ((long)Math.Round((double)(array[num9].Type - 13L) / 2.0)) : ((long)Math.Round((double)(array[num9].Type - 12L) / 2.0))); } else { array[num9].Size = (long)((ulong)this.SQLDataTypeSize[(int)array[num9].Type]); } num8 = num8 + (long)(num6 - num5) + 1L; num9++; } this.SqlRows[num2 + i].RowData = new string[array.Length - 1 + 1]; int num10 = 0; int num11 = array.Length - 1; for (int j = 0; j <= num11; j++) { if (array[j].Type > 9L) { if (!CNT.ItIsOdd(array[j].Type)) { if (decimal.Compare(new decimal(this.DataEncoding), 1m) == 0) { this.SqlRows[num2 + i].RowData[j] = Encoding.Default.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(num7)), new decimal(num10))), (int)array[j].Size); } else if (decimal.Compare(new decimal(this.DataEncoding), 2m) == 0) { this.SqlRows[num2 + i].RowData[j] = Encoding.Unicode.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(num7)), new decimal(num10))), (int)array[j].Size); } else if (decimal.Compare(new decimal(this.DataEncoding), 3m) == 0) { this.SqlRows[num2 + i].RowData[j] = Encoding.BigEndianUnicode.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(num7)), new decimal(num10))), (int)array[j].Size); } } else { this.SqlRows[num2 + i].RowData[j] = Encoding.Default.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(num7)), new decimal(num10))), (int)array[j].Size); } } else { this.SqlRows[num2 + i].RowData[j] = Convert.ToString(this.ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(num7)), new decimal(num10))), (int)array[j].Size)); } num10 += (int)array[j].Size; } } } else if (this.DataArray[(int)((uint)Offset)] == 5) { int num12 = (int)Convert.ToUInt16(decimal.Subtract(new decimal(this.ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 3m)), 2)), 1m)); for (int k = 0; k <= num12; k++) { ushort num13 = (ushort)this.ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12m), new decimal(k * 2))), 2); this.ReadDataEntriesFromOffsets(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(this.ToUInt64((int)(Offset + (ulong)num13), 4)), 1m), new decimal((int)this.PageSize)))); } this.ReadDataEntriesFromOffsets(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(this.ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 8m)), 4)), 1m), new decimal((int)this.PageSize)))); } return(true); }
// Token: 0x06000124 RID: 292 RVA: 0x000072FC File Offset: 0x000054FC private void ReadDataEntries(ulong Offset) { if (this.DataArray[(int)((uint)Offset)] == 13) { ushort num = (this.ToUInt64((Offset.ForceTo <decimal>() + 3m).ForceTo <int>(), 2).ForceTo <decimal>() - 1m).ForceTo <ushort>(); int num2 = 0; if (this.DataEntries != null) { num2 = this.DataEntries.Length; this.DataEntries = (FF[])Utils.CopyArray(this.DataEntries, new FF[this.DataEntries.Length + (int)num + 1]); } else { this.DataEntries = new FF[(int)(num + 1)]; } int num3 = (int)num; for (int i = 0; i <= num3; i++) { ulong num4 = this.ToUInt64((Offset.ForceTo <decimal>() + 8m + (i * 2).ForceTo <decimal>()).ForceTo <int>(), 2); if (decimal.Compare(Offset.ForceTo <decimal>(), 100m) != 0) { num4 += Offset; } int num5 = this.GetValues(num4.ForceTo <int>()); this.CalcVertical(num4.ForceTo <int>(), num5); int num6 = this.GetValues((num4.ForceTo <decimal>() + num5.ForceTo <decimal>() - num4.ForceTo <decimal>() + 1m).ForceTo <int>()); this.DataEntries[num2 + i].ID = this.CalcVertical((num4.ForceTo <decimal>() + num5.ForceTo <decimal>() - num4.ForceTo <decimal>() + 1m).ForceTo <int>(), num6); num4 = (num4.ForceTo <decimal>() + num6.ForceTo <decimal>() - num4.ForceTo <decimal>() + 1m).ForceTo <ulong>(); num5 = this.GetValues(num4.ForceTo <int>()); num6 = num5; long value = this.CalcVertical(num4.ForceTo <int>(), num5); long[] array = new long[5]; int num7 = 0; do { num5 = num6 + 1; num6 = this.GetValues(num5); array[num7] = this.CalcVertical(num5, num6); if (array[num7] > 9L) { array[num7] = (CNT.ItIsOdd(array[num7]) ? ((long)Math.Round((double)(array[num7] - 13L) / 2.0)) : ((long)Math.Round((double)(array[num7] - 12L) / 2.0))); } else { array[num7] = (long)((ulong)this.SQLDataTypeSize[(int)array[num7]]); } num7++; }while (num7 <= 4); Encoding encoding = Encoding.Default; decimal value2 = this.DataEncoding.ForceTo <decimal>(); if (!1m.Equals(value2)) { if (!2m.Equals(value2)) { if (3m.Equals(value2)) { encoding = Encoding.BigEndianUnicode; } } else { encoding = Encoding.Unicode; } } else { encoding = Encoding.Default; } this.DataEntries[num2 + i].Type = encoding.GetString(this.DataArray, Convert.ToInt32(decimal.Add(new decimal(num4), new decimal(value))), (int)array[0]); this.DataEntries[num2 + i].Name = encoding.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(value)), new decimal(array[0]))), (int)array[1]); this.DataEntries[num2 + i].RootNum = (long)this.ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num4), new decimal(value)), new decimal(array[0])), new decimal(array[1])), new decimal(array[2]))), (int)array[3]); this.DataEntries[num2 + i].SqlStatement = encoding.GetString(this.DataArray, Convert.ToInt32(decimal.Add(decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num4), new decimal(value)), new decimal(array[0])), new decimal(array[1])), new decimal(array[2])), new decimal(array[3]))), (int)array[4]); } return; } if (this.DataArray[(int)((uint)Offset)] == 5) { int num8 = (int)Convert.ToUInt16(decimal.Subtract(new decimal(this.ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 3m)), 2)), 1m)); for (int j = 0; j <= num8; j++) { ushort num9 = (ushort)this.ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12m), new decimal(j * 2))), 2); if (decimal.Compare(new decimal(Offset), 100m) == 0) { this.ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(this.ToUInt64((int)num9, 4)), 1m), new decimal((int)this.PageSize)))); } else { this.ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(this.ToUInt64((int)(Offset + (ulong)num9), 4)), 1m), new decimal((int)this.PageSize)))); } } this.ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(this.ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 8m)), 4)), 1m), new decimal((int)this.PageSize)))); } }