Exemplo n.º 1
0
        // Token: 0x06002220 RID: 8736 RVA: 0x0007422C File Offset: 0x0007242C
        public int method_3(Enum73 algorithm, bool caseInsensitive)
        {
            int      result;
            NtStatus status = Class265.RtlHashUnicodeString(ref this, caseInsensitive, algorithm, out result);

            status.smethod_6();
            return(result);
        }
 public static extern NtStatus RtlHashUnicodeString([In] ref Struct31 String, [In] bool CaseInSensitive, [In] Enum73 HashAlgorithm, out int HashValue);
Exemplo n.º 3
0
 // Token: 0x06002221 RID: 8737 RVA: 0x0000E44F File Offset: 0x0000C64F
 public int method_4(Enum73 algorithm)
 {
     return(this.method_3(algorithm, false));
 }
Exemplo n.º 4
0
 // Token: 0x06002D58 RID: 11608
 // RVA: 0x001263EC File Offset: 0x001245EC
 internal static Class731 smethod_5(string string_0, float float_2, Vector2 vector2_0, Color color_0, Enum73 enum73_0, bool bool_0, bool bool_1, Enum72 enum72_0, bool bool_2, ref Vector2 vector2_1, ref RectangleF[] rectangleF_0, Color color_1, Color color_2, int int_0, bool bool_3, bool bool_4, string string_1, Vector4 vector4_0, Vector2 vector2_2, Class731 class731_0, int int_1, int int_2)
 {
     Class731 result;
     lock (Class747.object_0)
     {
         rectangleF_0 = null;
         try
         {
             using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero))
             {
                 using (StringFormat stringFormat = new StringFormat())
                 {
                     if (Class747.float_0 == 0f)
                     {
                         Class747.float_0 = 96f / graphics.DpiX;
                     }
                     float_2 *= Class747.float_0;
                     if (string_0 == null)
                     {
                         vector2_1 = Vector2.get_Zero();
                         result = null;
                     }
                     else
                     {
                         graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
                         if (string_1.StartsWith("Aller"))
                         {
                             string text = Class747.smethod_9(string_0);
                             if (text != null)
                             {
                                 string_1 = text;
                             }
                         }
                         if (int_1 == 0 && int_2 <= 0)
                         {
                             if (int_2 == -1)
                             {
                                 int_2 = string_0.Length;
                             }
                         }
                         else
                         {
                             string_0 = string_0.Substring(int_1, int_2);
                         }
                         if (float_2 < 20f && string_1.EndsWith(" Light"))
                         {
                             string_1 = string_1.Replace(" Light", string.Empty);
                         }
                         FontStyle fontStyle = FontStyle.Regular;
                         if (bool_0)
                         {
                             if (string_1.EndsWith(" Light"))
                             {
                                 string_1 = string_1.Replace(" Light", string.Empty);
                             }
                             fontStyle |= FontStyle.Bold;
                         }
                         if (bool_1)
                         {
                             fontStyle |= FontStyle.Underline;
                         }
                         switch (enum72_0)
                         {
                         case Enum72.const_0:
                         case Enum72.const_1:
                             stringFormat.Alignment = StringAlignment.Near;
                             break;
                         case Enum72.const_2:
                             stringFormat.Alignment = StringAlignment.Center;
                             break;
                         case Enum72.const_3:
                             stringFormat.Alignment = StringAlignment.Far;
                             break;
                         }
                         if (!Class905.smethod_16() && string_1.StartsWith("Aller"))
                         {
                             for (char c = '0'; c <= '9'; c += '\u0001')
                             {
                                 string_0 = string_0.Replace(c, c + '');
                             }
                         }
                         Font font = Class747.smethod_11(string_1, float_2 * Class747.float_1, fontStyle);
                         if (Class747.float_1 != 1f)
                         {
                             vector2_0 *= Class747.float_1;
                         }
                         SizeF sizeF;
                         try
                         {
                             if (string_0.Length == 0)
                             {
                                 string_0 = " ";
                             }
                             sizeF = ((vector2_0 != Vector2.get_Zero()) ? graphics.MeasureString(string_0, font, new SizeF(vector2_0.X, vector2_0.Y), stringFormat) : graphics.MeasureString(string_0, font));
                         }
                         catch (InvalidOperationException)
                         {
                             vector2_1 = Vector2.get_Zero();
                             result = null;
                             return result;
                         }
                         int num = (int)(sizeF.Width + 1f);
                         int num2 = (int)(sizeF.Height + 1f);
                         if (vector2_0.Y != 0f)
                         {
                             num2 = (int)vector2_0.Y;
                         }
                         if (vector2_0.X != 0f && (enum72_0 != Enum72.const_0 || color_1.get_A() > 0))
                         {
                             num = (int)vector2_0.X;
                         }
                         if (vector2_2 != Vector2.get_Zero() && vector2_0 == Vector2.get_Zero())
                         {
                             num += (int)(vector2_2.X * 2f);
                             num2 += (int)(vector2_2.Y * 2f);
                         }
                         vector2_1 = new Vector2((float)num, (float)num2);
                         float num3 = Math.Max(0.5f, Math.Min(1f, float_2 * Class747.float_1 / 14f));
                         if (bool_4)
                         {
                             rectangleF_0 = new RectangleF[string_0.Length];
                             int num4 = string_0.Length / 32 + 1;
                             for (int i = 0; i < num4; i++)
                             {
                                 int num5 = i * 32;
                                 int num6 = Math.Min(string_0.Length - num5, 32);
                                 CharacterRange[] array = new CharacterRange[num6];
                                 for (int j = 0; j < num6; j++)
                                 {
                                     array[j] = new CharacterRange(j + num5, 1);
                                 }
                                 stringFormat.SetMeasurableCharacterRanges(array);
                                 Region[] array2 = graphics.MeasureCharacterRanges(string_0, font, new RectangleF(vector2_2.X, vector2_2.Y, (vector2_0.X == 0f) ? float.PositiveInfinity : vector2_0.X, (vector2_0.Y == 0f) ? float.PositiveInfinity : vector2_0.Y), stringFormat);
                                 for (int k = 0; k < num6; k++)
                                 {
                                     Region region = array2[k];
                                     rectangleF_0[k + num5] = region.GetBounds(graphics);
                                 }
                             }
                         }
                         int num8;
                         if (bool_3)
                         {
                             int num7 = 0;
                             num8 = 0;
                             int l = 0;
                             while (l < string_0.Length)
                             {
                                 if (string_0[l++] != ' ')
                                 {
                                     break;
                                 }
                                 num7++;
                             }
                             int m = string_0.Length - 1;
                             while (m >= l)
                             {
                                 if (string_0[m--] != ' ')
                                 {
                                     break;
                                 }
                                 num8++;
                             }
                             if (num7 == string_0.Length)
                             {
                                 num8 += num7;
                             }
                         }
                         else
                         {
                             using (Bitmap bitmap = new Bitmap(num, num2, PixelFormat.Format32bppArgb))
                             {
                                 using (Graphics graphics2 = Graphics.FromImage(bitmap))
                                 {
                                     graphics2.TextRenderingHint = graphics.TextRenderingHint;
                                     graphics2.SmoothingMode = SmoothingMode.HighQuality;
                                     graphics2.InterpolationMode = InterpolationMode.HighQualityBicubic;
                                     if (color_1.get_A() > 0)
                                     {
                                         if (vector4_0 != Vector4.get_Zero())
                                         {
                                             Class747.smethod_6(graphics2, new Rectangle(0, 0, num, num2), new SolidBrush(Class778.smethod_6(color_1)), vector4_0);
                                             if (int_0 > 0)
                                             {
                                                 Class747.smethod_7(graphics2, new Rectangle(0, 0, num - (int)Math.Ceiling((double)((float)int_0 / 2f)), num2 - (int)Math.Ceiling((double)((float)int_0 / 2f))), new Pen(Class778.smethod_6(color_2), (float)int_0), vector4_0);
                                             }
                                         }
                                         else
                                         {
                                             graphics2.Clear(Class778.smethod_6(color_1));
                                             if (int_0 > 0)
                                             {
                                                 graphics2.DrawRectangle(new Pen(Class778.smethod_6(color_2), (float)int_0), new Rectangle(int_0 / 2, int_0 / 2, num - int_0, num2 - int_0));
                                             }
                                         }
                                     }
                                     else
                                     {
                                         graphics2.Clear(Color.FromArgb(1, (int)color_0.get_R(), (int)color_0.get_G(), (int)color_0.get_B()));
                                     }
                                     using (Brush brush = new SolidBrush(Class778.smethod_6(color_0)))
                                     {
                                         if (vector2_0 != Vector2.get_Zero())
                                         {
                                             vector2_0.X -= vector2_2.X * 2f;
                                             vector2_0.Y -= vector2_2.Y * 2f;
                                             switch (enum73_0)
                                             {
                                             case Enum73.const_1:
                                                 graphics2.DrawString(string_0, font, Class747.brush_0, new RectangleF(vector2_2.X - num3, num3 + vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
                                                 graphics2.DrawString(string_0, font, Class747.brush_0, new RectangleF(vector2_2.X + num3, num3 + vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
                                                 break;
                                             case Enum73.const_2:
                                             {
                                                 Brush brush2 = Class747.brush_1;
                                                 if (color_1.get_A() == 0 && int_0 == 1 && color_2.get_A() > 0)
                                                 {
                                                     brush2 = new SolidBrush(Class778.smethod_6(color_2));
                                                 }
                                                 graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X + num3, vector2_2.Y + num3, vector2_0.X, vector2_0.Y), stringFormat);
                                                 graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X + num3, vector2_2.Y - num3, vector2_0.X, vector2_0.Y), stringFormat);
                                                 graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X - num3, vector2_2.Y + num3, vector2_0.X, vector2_0.Y), stringFormat);
                                                 graphics2.DrawString(string_0, font, brush2, new RectangleF(vector2_2.X - num3, vector2_2.Y - num3, vector2_0.X, vector2_0.Y), stringFormat);
                                                 break;
                                             }
                                             }
                                             graphics2.DrawString(string_0, font, brush, new RectangleF(vector2_2.X, vector2_2.Y, vector2_0.X, vector2_0.Y), stringFormat);
                                         }
                                         else
                                         {
                                             switch (enum73_0)
                                             {
                                             case Enum73.const_1:
                                                 graphics2.DrawString(string_0, font, Class747.brush_0, vector2_2.X - num3, vector2_2.Y + num3);
                                                 graphics2.DrawString(string_0, font, Class747.brush_0, vector2_2.X + num3, vector2_2.Y + num3);
                                                 break;
                                             case Enum73.const_2:
                                             {
                                                 Brush brush3 = Class747.brush_1;
                                                 if (color_1.get_A() == 0 && int_0 == 1 && color_2.get_A() > 0)
                                                 {
                                                     brush3 = new SolidBrush(Class778.smethod_6(color_2));
                                                 }
                                                 graphics2.DrawString(string_0, font, brush3, vector2_2.X + num3, vector2_2.Y + num3);
                                                 graphics2.DrawString(string_0, font, brush3, vector2_2.X - num3, vector2_2.Y + num3);
                                                 graphics2.DrawString(string_0, font, brush3, vector2_2.X + num3, vector2_2.Y - num3);
                                                 graphics2.DrawString(string_0, font, brush3, vector2_2.X - num3, vector2_2.Y - num3);
                                                 break;
                                             }
                                             }
                                             graphics2.DrawString(string_0, font, brush, vector2_2.X, vector2_2.Y);
                                         }
                                     }
                                     BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, num, num2), ImageLockMode.ReadOnly, bitmap.PixelFormat);
                                     if (class731_0 != null && !class731_0.bool_2 && class731_0.method_0() == num)
                                     {
                                         if (class731_0.method_1() == num2)
                                         {
                                             class731_0.method_7(bitmapData.Scan0, num, num2, string_0);
                                             goto IL_936;
                                         }
                                     }
                                     class731_0 = Class731.smethod_7(bitmapData.Scan0, num, num2, true, string_0);
                                     IL_936:
                                     bitmap.UnlockBits(bitmapData);
                                     result = class731_0;
                                     return result;
                                 }
                             }
                         }
                         vector2_1 = new Vector2((float)num + (float)num8 * 5.145f * float_2 / 12f, (float)num2);
                         result = null;
                     }
                 }
             }
         }
         catch (Exception)
         {
             vector2_1 = Vector2.get_Zero();
             result = null;
         }
     }
     return result;
 }