Ejemplo n.º 1
0
 private void d(ulong gm)
 {
     if (h[(uint)gm] == 13)
     {
         ushort num  = (a((gm.ForceTo <decimal>() + 3m).ForceTo <int>(), 2).ForceTo <decimal>() - 1m).ForceTo <ushort>();
         int    num2 = 0;
         if (k != null)
         {
             num2 = k.Length;
             k    = (FF[])Utils.CopyArray(k, new FF[k.Length + num + 1]);
         }
         else
         {
             k = new FF[num + 1];
         }
         int num3 = num;
         for (int i = 0; i <= num3; i++)
         {
             ulong num4 = a((gm.ForceTo <decimal>() + 8m + (i * 2).ForceTo <decimal>()).ForceTo <int>(), 2);
             if (decimal.Compare(gm.ForceTo <decimal>(), 100m) != 0)
             {
                 num4 += gm;
             }
             int num5 = c(num4.ForceTo <int>());
             b(num4.ForceTo <int>(), num5);
             int num6 = c((num4.ForceTo <decimal>() + num5.ForceTo <decimal>() - num4.ForceTo <decimal>() + 1m).ForceTo <int>());
             k[num2 + i].ID = b((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           = c(num4.ForceTo <int>());
             num6           = num5;
             long   value = b(num4.ForceTo <int>(), num5);
             long[] array = new long[5];
             int    num7  = 0;
             do
             {
                 num5        = num6 + 1;
                 num6        = c(num5);
                 array[num7] = b(num5, num6);
                 if (array[num7] > 9)
                 {
                     if (ItIsOdd(array[num7]))
                     {
                         array[num7] = (long)Math.Round((double)(array[num7] - 13) / 2.0);
                     }
                     else
                     {
                         array[num7] = (long)Math.Round((double)(array[num7] - 12) / 2.0);
                     }
                 }
                 else
                 {
                     array[num7] = m[(int)array[num7]];
                 }
                 num7++;
             }while (num7 <= 4);
             Encoding encoding = Encoding.Default;
             decimal  value2   = this.i.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;
             }
             k[num2 + i].Type         = encoding.GetString(h, Convert.ToInt32(decimal.Add(new decimal(num4), new decimal(value))), (int)array[0]);
             k[num2 + i].Name         = encoding.GetString(h, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(value)), new decimal(array[0]))), (int)array[1]);
             k[num2 + i].RootNum      = (long)a(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]);
             k[num2 + i].SqlStatement = encoding.GetString(h, 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]);
         }
     }
     else
     {
         if (h[(uint)gm] != 5)
         {
             return;
         }
         int num8 = Convert.ToUInt16(decimal.Subtract(new decimal(a(Convert.ToInt32(decimal.Add(new decimal(gm), 3m)), 2)), 1m));
         for (int j = 0; j <= num8; j++)
         {
             ushort num9 = (ushort)a(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(gm), 12m), new decimal(j * 2))), 2);
             if (decimal.Compare(new decimal(gm), 100m) == 0)
             {
                 d(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(a(num9, 4)), 1m), new decimal(this.j))));
             }
             else
             {
                 d(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(a((int)(gm + num9), 4)), 1m), new decimal(this.j))));
             }
         }
         d(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(a(Convert.ToInt32(decimal.Add(new decimal(gm), 8m)), 4)), 1m), new decimal(this.j))));
     }
 }
Ejemplo n.º 2
0
 private void ReadDataEntries(ulong Offset)
 {
     if (DataArray[(uint)Offset] == 13)
     {
         ushort num  = (ToUInt64((Offset.ForceTo <decimal>() + 3m).ForceTo <int>(), 2).ForceTo <decimal>() - decimal.One).ForceTo <ushort>();
         int    num2 = 0;
         if (DataEntries != null)
         {
             num2        = DataEntries.Length;
             DataEntries = (FF[])Utils.CopyArray(DataEntries, new FF[DataEntries.Length + num + 1]);
         }
         else
         {
             DataEntries = new FF[num + 1];
         }
         int num3 = num;
         for (int i = 0; i <= num3; i++)
         {
             ulong num4 = ToUInt64((Offset.ForceTo <decimal>() + 8m + (i * 2).ForceTo <decimal>()).ForceTo <int>(), 2);
             if (decimal.Compare(Offset.ForceTo <decimal>(), 100m) != 0)
             {
                 num4 += Offset;
             }
             int values = GetValues(num4.ForceTo <int>());
             CalcVertical(num4.ForceTo <int>(), values);
             int values2 = GetValues((num4.ForceTo <decimal>() + values.ForceTo <decimal>() - num4.ForceTo <decimal>() + decimal.One).ForceTo <int>());
             DataEntries[num2 + i].ID = CalcVertical((num4.ForceTo <decimal>() + values.ForceTo <decimal>() - num4.ForceTo <decimal>() + decimal.One).ForceTo <int>(), values2);
             num4    = (num4.ForceTo <decimal>() + values2.ForceTo <decimal>() - num4.ForceTo <decimal>() + decimal.One).ForceTo <ulong>();
             values  = GetValues(num4.ForceTo <int>());
             values2 = values;
             long   value = CalcVertical(num4.ForceTo <int>(), values);
             long[] array = new long[5];
             int    num5  = 0;
             do
             {
                 values      = values2 + 1;
                 values2     = GetValues(values);
                 array[num5] = CalcVertical(values, values2);
                 if (array[num5] > 9)
                 {
                     if (ItIsOdd(array[num5]))
                     {
                         array[num5] = (long)Math.Round((double)(array[num5] - 13) / 2.0);
                     }
                     else
                     {
                         array[num5] = (long)Math.Round((double)(array[num5] - 12) / 2.0);
                     }
                 }
                 else
                 {
                     array[num5] = SQLDataTypeSize[(int)array[num5]];
                 }
                 num5++;
             }while (num5 <= 4);
             Encoding encoding = Encoding.Default;
             decimal  value2   = DataEncoding.ForceTo <decimal>();
             if (!decimal.One.Equals(value2))
             {
                 if (!2m.Equals(value2))
                 {
                     if (3m.Equals(value2))
                     {
                         encoding = Encoding.BigEndianUnicode;
                     }
                 }
                 else
                 {
                     encoding = Encoding.Unicode;
                 }
             }
             else
             {
                 encoding = Encoding.Default;
             }
             DataEntries[num2 + i].Type         = encoding.GetString(DataArray, Convert.ToInt32(decimal.Add(new decimal(num4), new decimal(value))), (int)array[0]);
             DataEntries[num2 + i].Name         = encoding.GetString(DataArray, Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num4), new decimal(value)), new decimal(array[0]))), (int)array[1]);
             DataEntries[num2 + i].RootNum      = (long)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]);
             DataEntries[num2 + i].SqlStatement = encoding.GetString(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]);
         }
     }
     else
     {
         if (DataArray[(uint)Offset] != 5)
         {
             return;
         }
         int num6 = Convert.ToUInt16(decimal.Subtract(new decimal(ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 3m)), 2)), decimal.One));
         for (int j = 0; j <= num6; j++)
         {
             ushort num7 = (ushort)ToUInt64(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12m), new decimal(j * 2))), 2);
             if (decimal.Compare(new decimal(Offset), 100m) == 0)
             {
                 ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ToUInt64(num7, 4)), decimal.One), new decimal(PageSize))));
             }
             else
             {
                 ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ToUInt64((int)(Offset + num7), 4)), decimal.One), new decimal(PageSize))));
             }
         }
         ReadDataEntries(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ToUInt64(Convert.ToInt32(decimal.Add(new decimal(Offset), 8m)), 4)), decimal.One), new decimal(PageSize))));
     }
 }