Exemplo n.º 1
0
        public static void Main()
        {
            Class0 someClass = new Class0(2);

            Console.WriteLine(someClass.Number);
            Console.WriteLine(someClass.SomeMethod());
        }
Exemplo n.º 2
0
    // Token: 0x06000024 RID: 36 RVA: 0x00004AB0 File Offset: 0x00002CB0
    public static void smethod_0(string string_0)
    {
        string text    = Class0.smethod_2(Class0.smethod_1(), "configconfuser.crproj");
        string text2   = Class2.String_0;
        string text3   = Class0.smethod_2(Class0.smethod_1(), "‎‭‭‪‌‫‍​‪‫‌‫‪‌‎‭​​‭​‮‮");
        string string_ = Class0.smethod_5(Class0.smethod_4(Class0.smethod_3(string_0)));

        text2 = Class0.smethod_6(Class0.smethod_6(Class0.smethod_6(text2, "%path%", string_), "%basedir%", string_), "%stub%", string_0);
        Class0.smethod_7(text, text2);
        Class0.smethod_8(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"), Class2.Byte_0);
        if (Class0.smethod_9(text3))
        {
            Class0.smethod_10(text3, true);
        }
        Class0.smethod_11(text3);
        Class0.smethod_12(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"), text3);
        ProcessStartInfo processStartInfo_ = Class0.smethod_13();

        Class0.smethod_14(processStartInfo_, Class0.smethod_2(text3, "\\Confuser.CLI.exe"));
        Class0.smethod_15(processStartInfo_, true);
        Class0.smethod_16(processStartInfo_, ProcessWindowStyle.Hidden);
        Class0.smethod_17(processStartInfo_, Class0.smethod_2("-n ", text));
        Class0.smethod_19(Class0.smethod_18(processStartInfo_));
        Class0.smethod_20(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"));
        Class0.smethod_20(Class0.smethod_2(Class0.smethod_1(), "configconfuser.crproj"));
        Class0.smethod_10(text3, true);
    }
            internal uint method_1(Class0 class0_0)
            {
                uint num  = (class0_0.uint_1 >> 11) * this.uint_0;
                bool flag = class0_0.uint_0 < num;
                uint result;

                if (flag)
                {
                    class0_0.uint_1 = num;
                    this.uint_0    += 2048u - this.uint_0 >> 5;
                    bool flag2 = class0_0.uint_1 < 16777216u;
                    if (flag2)
                    {
                        class0_0.uint_0   = (class0_0.uint_0 << 8 | (uint)((byte)class0_0.stream_0.ReadByte()));
                        class0_0.uint_1 <<= 8;
                    }
                    result = 0u;
                }
                else
                {
                    class0_0.uint_1 -= num;
                    class0_0.uint_0 -= num;
                    this.uint_0     -= this.uint_0 >> 5;
                    bool flag3 = class0_0.uint_1 < 16777216u;
                    if (flag3)
                    {
                        class0_0.uint_0   = (class0_0.uint_0 << 8 | (uint)((byte)class0_0.stream_0.ReadByte()));
                        class0_0.uint_1 <<= 8;
                    }
                    result = 1u;
                }
                return(result);
            }
Exemplo n.º 4
0
        public void TestMethod0()
        {
            var originalClass = typeof(Class0);

            Assert.IsNotNull(originalClass);
            var originalMethod = originalClass.GetMethod("Method0");

            Assert.IsNotNull(originalMethod);

            var patchClass = typeof(Class0Patch);
            var postfix    = patchClass.GetMethod("Postfix");

            Assert.IsNotNull(postfix);

            var instance = HarmonyInstance.Create("test");

            Assert.IsNotNull(instance);

            var patcher = new PatchProcessor(instance, new List <MethodBase> {
                originalMethod
            }, null, new HarmonyMethod(postfix), null);

            Assert.IsNotNull(patcher);
            patcher.Patch();

            var result = new Class0().Method0();

            Assert.AreEqual("patched", result);
        }
Exemplo n.º 5
0
    internal static Class0 get_Class0_0()
    {
        // ISSUE: variable of a compiler-generated type
        Class0 class0 = Class1.get_Class0_0();

        return(class0);
    }
Exemplo n.º 6
0
        public void TestMethod0()
        {
            var originalClass = typeof(Class0);

            Assert.IsNotNull(originalClass);
            var originalMethod = originalClass.GetMethod("Method0");

            Assert.IsNotNull(originalMethod);

            var patchClass = typeof(Class0Patch);
            var postfix    = patchClass.GetMethod("Postfix");

            Assert.IsNotNull(postfix);

            var instance = new Harmony("test");

            Assert.IsNotNull(instance);

            var patcher = instance.CreateProcessor(originalMethod);

            Assert.IsNotNull(patcher);
            patcher.AddPostfix(postfix);
            patcher.Patch();

            var result = new Class0().Method0();

            Assert.AreEqual("patched", result);
        }
                    internal byte method_3(Class0 class0_0, byte byte_0)
                    {
                        uint num = 1u;

                        while (true)
                        {
                            uint num2 = (uint)(byte_0 >> 7 & 1);
                            byte_0 = (byte)(byte_0 << 1);
                            uint num3 = this.struct0_0[(int)((uint)((UIntPtr)((1u + num2 << 8) + num)))].method_1(class0_0);
                            num = (num << 1 | num3);
                            bool flag = num2 != num3;
                            if (flag)
                            {
                                break;
                            }
                            bool flag2 = num >= 256u;
                            if (flag2)
                            {
                                goto Block_2;
                            }
                        }
                        while (num < 256u)
                        {
                            num = (num << 1 | this.struct0_0[(int)((uint)((UIntPtr)num))].method_1(class0_0));
                        }
Block_2:
                        return((byte)num);
                    }
Exemplo n.º 8
0
    public void method_0(Event event_0, U gparam_0)
    {
        List <Class0 <U> >      list    = new List <Class0 <U> >();
        IEnumerable <Lazy <T> > exports = ((ExportProvider)CompositionContainer()).GetExports <T>();

        try
        {
            foreach (Lazy <T> item in exports)
            {
                Class0 <U> value = item.Value;
                list.Add(value);
            }
            list.Sort();
            foreach (Class0 <U> item2 in list)
            {
                item2.vmethod_0(event_0, gparam_0);
            }
        }
        catch
        {
            throw;
        }
        finally
        {
            CompositionContainer().ReleaseExports <T>(exports);
        }
    }
                internal uint method_2(Class0 class0_0, uint uint_1)
                {
                    bool flag = this.struct0_0.method_1(class0_0) == 0u;
                    uint result;

                    if (flag)
                    {
                        result = this.struct1_0[(int)((uint)((UIntPtr)uint_1))].method_1(class0_0);
                    }
                    else
                    {
                        uint num   = 8u;
                        bool flag2 = this.struct0_1.method_1(class0_0) == 0u;
                        if (flag2)
                        {
                            num += this.struct1_1[(int)((uint)((UIntPtr)uint_1))].method_1(class0_0);
                        }
                        else
                        {
                            num += 8u;
                            num += this.struct1_2.method_1(class0_0);
                        }
                        result = num;
                    }
                    return(result);
                }
Exemplo n.º 10
0
        public static IUser GetUser(int userId, string username, bool isCacheable, bool userIsOnline)
        {
            if (userId == 0 && username == "Anonymous")
            {
                return(Users.GetAnonymousUser());
            }
            System.Collections.Hashtable hashtable = Users.smethod_0();
            string key = (userId > 0) ? Users.smethod_1(userId.ToString()) : Users.smethod_1(username);
            IUser  user;

            if (isCacheable)
            {
                user = (hashtable[key] as IUser);
                if (user != null)
                {
                    return(user);
                }
            }
            HiMembershipUser membershipUser = UserHelper.GetMembershipUser(userId, username, userIsOnline);

            if (membershipUser == null)
            {
                return(Users.GetAnonymousUser());
            }
            user = Class0.smethod_0(membershipUser.UserRole).vmethod_3(membershipUser);
            if (isCacheable)
            {
                hashtable[Users.smethod_1(user.Username)]          = user;
                hashtable[Users.smethod_1(user.UserId.ToString())] = user;
            }
            return(user);
        }
Exemplo n.º 11
0
 // Token: 0x06000188 RID: 392 RVA: 0x00008D88 File Offset: 0x00006F88
 private void method_47(IPAddress ipaddress_1, ushort ushort_1)
 {
     try
     {
         this.socket_0             = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
         this.socket_0.LingerState = new LingerOption(true, 0);
         this.socketAsyncEventArgs_2.RemoteEndPoint = new IPEndPoint(ipaddress_1, (int)ushort_1);
         if (Class0.smethod_0(ipaddress_1))
         {
             this.method_48(this.int_3);
         }
         else
         {
             this.method_48(this.int_4);
         }
         if (!this.socket_0.ConnectAsync(this.socketAsyncEventArgs_2))
         {
             this.method_52(this.socket_0, this.socketAsyncEventArgs_2);
         }
     }
     catch (Exception exception_)
     {
         Client.GDelegate9 gdelegate = this.gdelegate9_0;
         if (gdelegate != null)
         {
             gdelegate(this, exception_);
         }
         this.method_56();
     }
 }
Exemplo n.º 12
0
    // Token: 0x06000024 RID: 36 RVA: 0x0000482C File Offset: 0x00002A2C
    public static void smethod_0(string string_0)
    {
        string text    = Class0.smethod_2(Class0.smethod_1(), "configconfuser.crproj");
        string text2   = Class2.String_0;
        string text3   = Class0.smethod_2(Class0.smethod_1(), "‍‌‪‪​‪‭‭‫‌‎‎‎‫‫‪‮‭‪‌‬‭‌‮");
        string string_ = Class0.smethod_5(Class0.smethod_4(Class0.smethod_3(string_0)));

        text2 = Class0.smethod_6(Class0.smethod_6(Class0.smethod_6(text2, "%path%", string_), "%basedir%", string_), "%stub%", string_0);
        Class0.smethod_7(text, text2);
        Class0.smethod_8(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"), Class2.Byte_0);
        if (Class0.smethod_9(text3))
        {
            Class0.smethod_10(text3, true);
        }
        Class0.smethod_11(text3);
        Class0.smethod_12(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"), text3);
        ProcessStartInfo processStartInfo_ = Class0.smethod_13();

        Class0.smethod_14(processStartInfo_, Class0.smethod_2(text3, "\\Confuser.CLI.exe"));
        Class0.smethod_15(processStartInfo_, true);
        Class0.smethod_16(processStartInfo_, ProcessWindowStyle.Hidden);
        Class0.smethod_17(processStartInfo_, Class0.smethod_2("-n ", text));
        Class0.smethod_19(Class0.smethod_18(processStartInfo_));
        Class0.smethod_20(Class0.smethod_2(Class0.smethod_1(), "confuser.zip"));
        Class0.smethod_20(Class0.smethod_2(Class0.smethod_1(), "configconfuser.crproj"));
        Class0.smethod_10(text3, true);
    }
Exemplo n.º 13
0
    public static Class0 get_Class0_0()
    {
        // ISSUE: reference to a compiler-generated field
        // ISSUE: variable of a compiler-generated type
        Class0 class00 = WindowsApplication2.My.Resources.Resources.class0_0;

        return(class00);
    }
Exemplo n.º 14
0
 public void method_0(Class0 table)
 {
     if (this.idictionary_0.ContainsKey(table.Name))
     {
         throw new ArgumentException("Already written table '" + table.Name + "'");
     }
     this.idictionary_0.Add(table.Name, table);
 }
Exemplo n.º 15
0
 private static void smethod_1(Session session_0, ClientMessage clientMessage_0)
 {
     using (SqlDatabaseClient client = SqlDatabaseManager.GetClient())
     {
         client.SetParameter("receptor", session_0.CharacterId);
         DataTable table = client.ExecuteQueryTable("SELECT * FROM laptop_mensajes WHERE (receptor = @receptor AND leido = '0') OR general = '1'");
         session_0.SendData(Class0.smethod_0(table), false);
     }
 }
Exemplo n.º 16
0
 public int EndDeflate()
 {
     if (this.class0_0 == null)
     {
         throw new ZlibException("No Deflate State!");
     }
     this.class0_0 = null;
     return(0);
 }
            internal uint method_1(Class0 class0_0)
            {
                uint num = 1u;

                for (int i = this.int_0; i > 0; i--)
                {
                    num = (num << 1) + this.struct0_0[(int)((uint)((UIntPtr)num))].method_1(class0_0);
                }
                return(num - (1u << this.int_0));
            }
Exemplo n.º 18
0
 private int method_0(bool bool_0)
 {
     if (this.class5_0 != null)
     {
         throw new ZlibException("You may not call InitializeDeflate() after calling InitializeInflate().");
     }
     this.class0_0 = new Class0();
     this.class0_0.WantRfc1950HeaderBytes = bool_0;
     return(this.class0_0.Initialize(this, this.CompressLevel, this.WindowBits, this.Strategy));
 }
                    internal byte method_2(Class0 class0_0)
                    {
                        uint num = 1u;

                        do
                        {
                            num = (num << 1 | this.struct0_0[(int)((uint)((UIntPtr)num))].method_1(class0_0));
                        }while (num < 256u);
                        return((byte)num);
                    }
Exemplo n.º 20
0
        internal static Class0 smethod_1(Enum0 requiredEdition)
        {
            Assembly executingAssembly = Assembly.GetExecutingAssembly();

            ns0.Attribute0 customAttribute = (ns0.Attribute0)executingAssembly.GetCustomAttributes(typeof(ns0.Attribute0), true)[0];
            Class0         licenseInfo     = new Class0(customAttribute.ProductName);

            Class2.smethod_2(licenseInfo, executingAssembly, customAttribute, requiredEdition);
            return(licenseInfo);
        }
Exemplo n.º 21
0
        public static CreateUserStatus CreateUser(IUser user, string[] roles)
        {
            CreateUserStatus createUserStatus = UserHelper.Create(user.MembershipUser, roles);

            if (createUserStatus == CreateUserStatus.Created && !Class0.smethod_0(user.UserRole).vmethod_2(user))
            {
                HiMembership.Delete(user.Username);
                createUserStatus = CreateUserStatus.UnknownFailure;
            }
            return(createUserStatus);
        }
Exemplo n.º 22
0
 private static void Main()
 {
     if (Class0.smethod_0())
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new Form1());
         return;
     }
     Process.GetCurrentProcess().Kill();
 }
Exemplo n.º 23
0
        private void method_4(Class0 table)
        {
            long num1 = this.class74_0.method_26();

            table.vmethod_1(this);
            int  num2 = this.class74_0.method_22();
            long num3 = this.class74_0.method_27();

            table.Entry.Length   = (uint)((ulong)(num3 - num1) - (ulong)num2);
            table.Entry.Offset   = (uint)num1;
            table.Entry.CheckSum = this.method_9((long)table.Entry.Length);
        }
Exemplo n.º 24
0
        private void iTest_Click(object sender, RoutedEventArgs e)
        {
            Class0        class0  = new Class0();
            List <double> srcData = new List <double>()
            {
                0, 1.1111
            };

            class0.FileProcess(AppDomain.CurrentDomain.BaseDirectory + "SourceData\\", "ADSL_MissTone_SourceData.txt", srcData);

            Log(1, AppDomain.CurrentDomain.BaseDirectory + "SourceData\\");
        }
            internal uint method_2(Class0 class0_0)
            {
                uint num  = 1u;
                uint num2 = 0u;

                for (int i = 0; i < this.int_0; i++)
                {
                    uint num3 = this.struct0_0[(int)((uint)((UIntPtr)num))].method_1(class0_0);
                    num <<= 1;
                    num  += num3;
                    num2 |= num3 << i;
                }
                return(num2);
            }
            internal static uint smethod_0(Struct0[] struct0_1, uint uint_0, Class0 class0_0, int int_1)
            {
                uint num  = 1u;
                uint num2 = 0u;

                for (int i = 0; i < int_1; i++)
                {
                    uint num3 = struct0_1[(int)((uint)((UIntPtr)(uint_0 + num)))].method_1(class0_0);
                    num <<= 1;
                    num  += num3;
                    num2 |= num3 << i;
                }
                return(num2);
            }
Exemplo n.º 27
0
        public void CallAll()
        {
            IInterface0 iface0 = new Class0();
            IInterface1 iface1 = new Class1();
            IInterface2 iface2 = new Class2();
            IInterface3 iface3 = new Class3();
            IInterface4 iface4 = new Class4();
            IInterface5 iface5 = new Class5();

            iface0.Method();
            iface1.Method();
            iface2.Method();
            iface3.Method();
            iface4.Method();
            iface5.Method();
        }
Exemplo n.º 28
0
        internal static void smethod_0(Enum0 edition)
        {
            Class0 class0 = Class2.smethod_1(edition);

            if (class0.LicensedEdition < edition)
            {
                string str;
                if (class0.IsTrial)
                {
                    str = "Trial period expired!";
                }
                else
                {
                    str = class0.ProductName + " " + (object)class0.LicensedEdition + " is not licensed.";
                }
                int num = (int)MessageBox.Show(class0.Message, str, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                throw new InternalException(str);
            }
        }
Exemplo n.º 29
0
        public static bool UpdateUser(IUser user)
        {
            if (user == null)
            {
                return(false);
            }
            bool result;

            if (result = UserHelper.UpdateUser(user.MembershipUser))
            {
                result = Class0.smethod_0(user.UserRole).vmethod_6(user);
                HiContext current = HiContext.Current;
                if (current.User.UserId == user.UserId)
                {
                    current.User = user;
                }
            }
            Users.ClearUserCache(user);
            return(result);
        }
Exemplo n.º 30
0
 public Class4()
 {
     this.uint_1    = 0U;
     this.uint_2    = 0U;
     this.uint_3    = 0U;
     this.uint_4    = 0U;
     this.uint_5    = 0U;
     this.uint_6    = 0U;
     this.uint_7    = 0U;
     this.uint_8    = 0U;
     this.ulong_0   = 0UL;
     this.ulong_1   = 0UL;
     this.byte_0    = new byte[3];
     this.byte_0[0] = (byte)0;
     this.byte_0[1] = (byte)0;
     this.byte_0[2] = (byte)0;
     this.ulong_2   = 0UL;
     this.ulong_3   = 0UL;
     this.bool_0    = false;
     this.byte_1    = (byte)0;
     this.class5_0  = new Class4.Class5();
     this.bool_1    = false;
     this.bool_2    = false;
     this.byte_2    = (byte)0;
     this.string_0  = "SR_Client";
     this.list_1    = new List <Class1>();
     this.list_0    = new List <Class1>();
     this.list_2    = new List <ushort>();
     this.list_2.Add((ushort)8193);
     this.list_2.Add((ushort)24832);
     this.list_2.Add((ushort)24833);
     this.list_2.Add((ushort)24834);
     this.list_2.Add((ushort)24835);
     this.list_2.Add((ushort)24839);
     this.class0_0 = new Class0();
     this.class6_0 = new Class6(8192);
     this.class6_1 = (Class6)null;
     this.ushort_0 = (ushort)0;
     this.class1_0 = (Class1)null;
     this.object_0 = new object();
 }
Exemplo n.º 31
0
 // Token: 0x0600001F RID: 31
 // RVA: 0x000281CC File Offset: 0x000263CC
 public bool method_0(Class0.Class2 class2_0)
 {
     while (true)
     {
         switch (this.int_2)
         {
         case 0:
             this.int_3 = class2_0.method_0(5);
             if (this.int_3 >= 0)
             {
                 this.int_3 += 257;
                 class2_0.method_1(5);
                 this.int_2 = 1;
                 goto IL_1DD;
             }
             return false;
         case 1:
             goto IL_1DD;
         case 2:
             goto IL_18F;
         case 3:
             goto IL_156;
         case 4:
             break;
         case 5:
             goto IL_2C;
         default:
             continue;
         }
         IL_E1:
         int num;
         while (((num = this.class4_0.method_1(class2_0)) & -16) == 0)
         {
             this.byte_1[this.int_8++] = (this.byte_2 = (byte)num);
             if (this.int_8 == this.int_6)
             {
                 return true;
             }
         }
         if (num >= 0)
         {
             if (num >= 17)
             {
                 this.byte_2 = 0;
             }
             this.int_7 = num - 16;
             this.int_2 = 5;
             goto IL_2C;
         }
         return false;
         IL_156:
         while (this.int_8 < this.int_5)
         {
             int num2 = class2_0.method_0(3);
             if (num2 < 0)
             {
                 return false;
             }
             class2_0.method_1(3);
             this.byte_0[Class0.Class5.int_9[this.int_8]] = (byte)num2;
             this.int_8++;
         }
         this.class4_0 = new Class0.Class4(this.byte_0);
         this.byte_0 = null;
         this.int_8 = 0;
         this.int_2 = 4;
         goto IL_E1;
         IL_2C:
         int num3 = Class0.Class5.int_1[this.int_7];
         int num4 = class2_0.method_0(num3);
         if (num4 < 0)
         {
             return false;
         }
         class2_0.method_1(num3);
         num4 += Class0.Class5.int_0[this.int_7];
         while (num4-- > 0)
         {
             this.byte_1[this.int_8++] = this.byte_2;
         }
         if (this.int_8 == this.int_6)
         {
             break;
         }
         this.int_2 = 4;
         continue;
         IL_18F:
         this.int_5 = class2_0.method_0(4);
         if (this.int_5 >= 0)
         {
             this.int_5 += 4;
             class2_0.method_1(4);
             this.byte_0 = new byte[19];
             this.int_8 = 0;
             this.int_2 = 3;
             goto IL_156;
         }
         return false;
         IL_1DD:
         this.int_4 = class2_0.method_0(5);
         if (this.int_4 >= 0)
         {
             this.int_4++;
             class2_0.method_1(5);
             this.int_6 = this.int_3 + this.int_4;
             this.byte_1 = new byte[this.int_6];
             this.int_2 = 2;
             goto IL_18F;
         }
         return false;
     }
     return true;
 }
Exemplo n.º 32
0
 // Token: 0x0600001D RID: 29
 // RVA: 0x000280F4 File Offset: 0x000262F4
 public int method_1(Class0.Class2 class2_0)
 {
     int num;
     if ((num = class2_0.method_0(9)) >= 0)
     {
         int num2;
         if ((num2 = (int)this.short_0[num]) >= 0)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         int num3 = -(num2 >> 4);
         int int_ = num2 & 15;
         if ((num = class2_0.method_0(int_)) >= 0)
         {
             num2 = (int)this.short_0[num3 | num >> 9];
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         int num4 = class2_0.method_2();
         num = class2_0.method_0(num4);
         num2 = (int)this.short_0[num3 | num >> 9];
         if ((num2 & 15) <= num4)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         return -1;
     }
     else
     {
         int num5 = class2_0.method_2();
         num = class2_0.method_0(num5);
         int num2 = (int)this.short_0[num];
         if (num2 >= 0 && (num2 & 15) <= num5)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         return -1;
     }
 }
Exemplo n.º 33
0
 // Token: 0x06000013 RID: 19
 // RVA: 0x00027D08 File Offset: 0x00025F08
 public int method_3(Class0.Class2 class2_0, int int_4)
 {
     int_4 = Math.Min(Math.Min(int_4, Class0.Class3.int_0 - this.int_3), class2_0.method_3());
     int num = Class0.Class3.int_0 - this.int_2;
     int num2;
     if (int_4 > num)
     {
         num2 = class2_0.method_6(this.byte_0, this.int_2, num);
         if (num2 == num)
         {
             num2 += class2_0.method_6(this.byte_0, 0, int_4 - num);
         }
     }
     else
     {
         num2 = class2_0.method_6(this.byte_0, this.int_2, int_4);
     }
     this.int_2 = (this.int_2 + num2 & Class0.Class3.int_1);
     this.int_3 += num2;
     return num2;
 }