コード例 #1
0
        private static void smethod_7()
        {
Label_0001:
            if (!NetCull.isClientRunning || (thread_0 == null))
            {
                return;
            }
            Path.Combine(Application.dataPath, Class3.smethod_10(0x9e2));
            System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
            foreach (ProcessModule module in process_0.Modules)
            {
                list.Add(module.FileName);
            }
            string_2 = list.ToArray();
            if (ProtectLoader.Debug)
            {
                File.WriteAllText(Path.Combine(Application.dataPath, Class3.smethod_10(0xa12)), string.Join(Class3.smethod_10(0x8a4), string_2));
            }
            foreach (string str in string_2)
            {
                if (!list_2.Contains(str))
                {
                    if (str.Contains(Class3.smethod_10(0xa3a), true))
                    {
                        smethod_0(Class3.smethod_10(0xa56), playerClient.userName + Class3.smethod_10(0xabc), true);
                        break;
                    }
                    if (new FileInfo(str).Length < 0x80000L)
                    {
                        byte[]   buffer     = File.ReadAllBytes(str);
                        string[] textArray1 = new string[] { Class3.smethod_10(0xb3a), Class3.smethod_10(0xb5c) };
                        if (smethod_3(buffer, textArray1) != -1L)
                        {
                            smethod_0(Class3.smethod_10(0xb74), playerClient.userName + Class3.smethod_10(0xbc6), true);
                            break;
                        }
                        string[] textArray2 = new string[] { Class3.smethod_10(0xc30), Class3.smethod_10(0xc42), Class3.smethod_10(0xc70) };
                        if (smethod_3(buffer, textArray2) != -1L)
                        {
                            smethod_0(Class3.smethod_10(0xca2), playerClient.userName + Class3.smethod_10(0xce2), true);
                            break;
                        }
                        if (smethod_2(buffer, Class3.smethod_10(0xa3a)) != -1L)
                        {
                            smethod_0(Class3.smethod_10(0xa56), playerClient.userName + Class3.smethod_10(0xabc), true);
                            break;
                        }
                    }
                    list_2.Add(str);
                }
            }
            using (System.Collections.Generic.List <ProcessEntry32> .Enumerator enumerator = Process32.GetProcess32List().GetEnumerator())
            {
                ProcessEntry32 current;
                string         str2;
                while (enumerator.MoveNext())
                {
                    current = enumerator.Current;
                    if (!list_0.Contains(current.th32ProcessID))
                    {
                        str2 = Process32.GetProcess32File(current);
                        if ((!string.IsNullOrEmpty(str2) && File.Exists(str2)) && !list_1.Contains(str2))
                        {
                            goto Label_02C6;
                        }
                    }
                }
                goto Label_0723;
Label_02C6:
                if (ProtectLoader.Debug)
                {
                    File.AppendAllText(Path.Combine(Application.dataPath, Class3.smethod_10(0xd3a)), string.Concat(new object[] { Class3.smethod_10(0xd66), current.th32ProcessID, Class3.smethod_10(0x456), str2, Class3.smethod_10(0x8a4) }));
                }
                if ((str2.Contains(Class3.smethod_10(0xd6c), true) || str2.Contains(Class3.smethod_10(0xd88), true)) || str2.Contains(Class3.smethod_10(0xda2), true))
                {
                    goto Label_06EA;
                }
                if (str2.Contains(Class3.smethod_10(0xe74), true))
                {
                    smethod_0(Class3.smethod_10(0xe8e), playerClient.userName + Class3.smethod_10(0xef4), true);
                    goto Label_0723;
                }
                MemoryStream stream = new MemoryStream();
                using (BinaryReader reader = new BinaryReader(File.OpenRead(str2)))
                {
                    reader.BaseStream.Seek(60L, SeekOrigin.Begin);
                    int num = reader.ReadInt32();
                    reader.BaseStream.Seek((long)(num + 6), SeekOrigin.Begin);
                    short num2 = reader.ReadInt16();
                    if (num2 > 7)
                    {
                        num2 = 7;
                    }
                    int num3 = num + 0x108;
                    for (int i = 0; i < num2; i++)
                    {
                        reader.BaseStream.Seek((long)num3, SeekOrigin.Begin);
                        uint num5 = reader.ReadUInt32();
                        uint num6 = reader.ReadUInt32();
                        if (num5 > 0x20000)
                        {
                            num5 = 0x20000;
                        }
                        reader.BaseStream.Seek((long)num6, SeekOrigin.Begin);
                        byte[] buffer2 = new byte[num5];
                        reader.Read(buffer2, 0, buffer2.Length);
                        stream.Write(buffer2, 0, buffer2.Length);
                        num3 += 40;
                    }
                }
                if (stream.Length > 0L)
                {
                    byte[] bytes = stream.ToArray();
                    if (ProtectLoader.Debug)
                    {
                        File.WriteAllBytes(Path.Combine(Application.dataPath, Class3.smethod_10(0xf6e) + Path.GetFileName(str2) + Class3.smethod_10(0xf84)), bytes);
                    }
                    string str3 = Encoding.ASCII.GetString(bytes);
                    string str4 = Encoding.Unicode.GetString(bytes);
                    string str5 = Encoding.BigEndianUnicode.GetString(bytes);
                    if (((str5.IndexOf(Class3.smethod_10(0xf90)) <= 0) && (str5.IndexOf(Class3.smethod_10(0xfac)) <= 0)) && (str3.IndexOf(Class3.smethod_10(0xfc6)) <= 0))
                    {
                        if ((str5.IndexOf(Class3.smethod_10(0x109c)) <= 0) && (str5.IndexOf(Class3.smethod_10(0x10b6)) <= 0))
                        {
                            if ((str3.IndexOf(Class3.smethod_10(0xe74)) <= 0) && (str5.IndexOf(Class3.smethod_10(0x11a2)) <= 0))
                            {
                                if (((str3.IndexOf(Class3.smethod_10(0x11b8)) <= 0) && (str4.IndexOf(Class3.smethod_10(0x11b8)) <= 0)) && (str4.IndexOf(Class3.smethod_10(0x11b8)) <= 0))
                                {
                                    goto Label_06AA;
                                }
                                smethod_0(Class3.smethod_10(0xe8e), playerClient.userName + Class3.smethod_10(0xef4), true);
                            }
                            else
                            {
                                smethod_0(Class3.smethod_10(0xe8e), playerClient.userName + Class3.smethod_10(0xef4), true);
                            }
                        }
                        else
                        {
                            smethod_0(Class3.smethod_10(0x10ce), playerClient.userName + Class3.smethod_10(0x112e), true);
                        }
                    }
                    else
                    {
                        smethod_0(Class3.smethod_10(0xfdc), playerClient.userName + Class3.smethod_10(0x1032), true);
                    }
                    goto Label_0723;
                }
Label_06AA:
                if (!list_1.Contains(str2))
                {
                    list_1.Add(str2);
                }
                if (!list_0.Contains(current.th32ProcessID))
                {
                    list_0.Add(current.th32ProcessID);
                }
                goto Label_0723;
Label_06EA:
                smethod_0(Class3.smethod_10(0xdbe), playerClient.userName + Class3.smethod_10(0xe18), true);
            }
Label_0723:
            Thread.Sleep(250);
            goto Label_0001;
        }