Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Reflection;
- class RunDlls
- {
- static string dx = "DevXUnityUnpackerTools";
- static string sis = "例子子";
- static string snull = "子子例";
- static string pwd = "$#54544^452345@234r44rr#345345#RND?@GN16#1C94AA06D5585BB7765";
- static object _obj;
- public void Run(object obj)
- {
- try{foreach (System.Diagnostics.Process v in System.Diagnostics.Process.GetProcesses())
- {if (v.ProcessName.ToLower().Contains("dnspy")|| v.ProcessName.ToLower().Contains("procmon")|| v.ProcessName.ToLower().Contains("procmon64")){return;}}
- System.AppDomain.CurrentDomain.AssemblyResolve += a;
- System.AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += b;
- _obj=obj;
- pwd=System.IO.File.Exists(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "DevXUnityUnpackerTools.dll")).ToString().Replace("False", pwd+"123"); pwd=pwd.Substring(0,pwd.Length-6);
- var ass = c(dx);
- var val = Activator.CreateInstance(((Assembly)ass).GetType(sis));;//System.Activator.CreateInstance(dx, sis).Unwrap();
- val.GetType().GetMethod(snull).Invoke(val, null);
- }catch{}
- }
- private static System.Reflection.Assembly b(object sender, System.ResolveEventArgs args) {return a(sender, args);}
- private static System.Reflection.Assembly a(object sender, System.ResolveEventArgs args) { string name = args.Name.Split(',')[0]; return (System.Reflection.Assembly)c(name); }
- static System.Collections.Generic.Dictionary<string, object> ass = new System.Collections.Generic.Dictionary<string, object>();
- static object c(string name)
- {
- string hash = hh(name.ToLower());
- if (ass.ContainsKey(hash)) return ass[hash];
- byte[] buff = null;
- if (System.IO.File.Exists(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath,hash)) == false) return null;
- buff = System.IO.File.ReadAllBytes(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath,hash));
- buff =(byte[])
- _obj.GetType().Assembly
- .GetType("例子")
- .GetMethod("测试", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public)
- .Invoke(null, new object[] { buff, (pwd + name.ToLower()) })
- ;
- var a = System.Reflection.Assembly.Load(buff);
- if (a.GetType("子例子") != null)
- {
- a.GetType("子例子").GetField("子例子子", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "53433t45gdfgdfhsdfh#RND1@GN16#318EAACFEC582A86");
- }
- if (a.GetType("子例子") != null)
- {
- a.GetType("子例子").GetField("例子子子", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "533DFD9332CD416CB79#RND2@GN16#7CFDC2C2966F35AE");
- }
- if (a.GetType("子例子") != null)
- {
- a.GetType("子例子").GetField("子例例", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "9005F3E4A466B46A9B7#RND3@GN16#3568D1E7D06841DB");
- }
- if (a.GetType("子例子") != null)
- {
- a.GetType("子例子").GetField("キスト", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "78171A0063B24DB3B3E#RND4@GN16#E7BE97D528879872");
- }
- if (a.GetType("子例子") != null)
- {
- a.GetType("子例子").GetField("スキト", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "ERG34t3REGTHTRY#RND5@GN16#3C7A844B9CC6DE76");
- }
- ass[hash] = a;
- return a;
- }
- internal static uint h(string s)
- {
- if (string.IsNullOrEmpty(s))
- return 123;
- int sind = 0;
- int num = 0x15051505;
- int num2 = num;
- for (int i = s.Length; i > 0; i -= 4)
- {
- if (sind + 1 < s.Length) num = (((num << 5) + num) + (num >> 0x1b)) ^ ((int)s[sind] | (int)s[sind + 1] << 16);//(numPtr[0]);
- else
- {
- if (sind < s.Length) num = (((num << 5) + num) + (num >> 0x1b)) ^ ((int)s[sind]);//(numPtr[0]);
- else num = (((num << 5) + num) + (num >> 0x1b)) ^ (0);
- }
- if (i <= 2) break;
- sind += 2;
- if (sind + 1 < s.Length) {num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ ((int)s[sind] | (int)s[sind + 1] << 16);}
- else
- {
- if (sind < s.Length) { num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ ((int)s[sind]);}
- else { num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ (0);}
- }
- sind += 2;
- }
- return (uint)(num + (num2 * 0x5d588b65));
- }
- internal static string hh(string s){ return string.Format("{0:X}", h(s));}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement