Advertisement
EddyKrieger

code.cs

Mar 23rd, 2018
2,429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.85 KB | None | 0 0
  1.  
  2. using System;
  3. using System.Reflection;
  4. class RunDlls
  5. {
  6.    static string dx = "DevXUnityUnpackerTools";
  7.    static string sis = "例子子";
  8.    static string snull = "子子例";
  9.    static string pwd = "$#54544^452345@234r44rr#345345#RND?@GN16#1C94AA06D5585BB7765";
  10.    static object _obj;
  11.     public void Run(object obj)
  12.     {
  13. try{foreach (System.Diagnostics.Process v in System.Diagnostics.Process.GetProcesses())
  14. {if (v.ProcessName.ToLower().Contains("dnspy")|| v.ProcessName.ToLower().Contains("procmon")|| v.ProcessName.ToLower().Contains("procmon64")){return;}}
  15.     System.AppDomain.CurrentDomain.AssemblyResolve += a;
  16.         System.AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += b;
  17.         _obj=obj;
  18.  
  19.       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);
  20.         var ass = c(dx);
  21.         var val = Activator.CreateInstance(((Assembly)ass).GetType(sis));;//System.Activator.CreateInstance(dx, sis).Unwrap();
  22.         val.GetType().GetMethod(snull).Invoke(val, null);
  23. }catch{}
  24.     }
  25.  private static System.Reflection.Assembly b(object sender, System.ResolveEventArgs args) {return a(sender, args);}
  26.  private static System.Reflection.Assembly a(object sender, System.ResolveEventArgs args) { string name = args.Name.Split(',')[0]; return (System.Reflection.Assembly)c(name); }
  27.  static System.Collections.Generic.Dictionary<string, object> ass = new System.Collections.Generic.Dictionary<string, object>();
  28.  static object c(string name)
  29.     {
  30.         string hash = hh(name.ToLower());
  31.         if (ass.ContainsKey(hash)) return ass[hash];
  32.         byte[] buff = null;
  33.         if (System.IO.File.Exists(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath,hash)) == false) return null;
  34.        buff = System.IO.File.ReadAllBytes(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath,hash));
  35.        
  36.         buff =(byte[])
  37.             _obj.GetType().Assembly
  38.             .GetType("例子")
  39.             .GetMethod("测试", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public)
  40.             .Invoke(null, new object[] { buff, (pwd + name.ToLower()) })
  41.             ;
  42.        
  43.         var a = System.Reflection.Assembly.Load(buff);
  44.  if (a.GetType("子例子") != null)
  45.         {
  46.             a.GetType("子例子").GetField("子例子子", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "53433t45gdfgdfhsdfh#RND1@GN16#318EAACFEC582A86");
  47.         }
  48.  if (a.GetType("子例子") != null)
  49.         {
  50.             a.GetType("子例子").GetField("例子子子", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "533DFD9332CD416CB79#RND2@GN16#7CFDC2C2966F35AE");
  51.         }
  52.  if (a.GetType("子例子") != null)
  53.         {
  54.             a.GetType("子例子").GetField("子例例", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "9005F3E4A466B46A9B7#RND3@GN16#3568D1E7D06841DB");
  55.         }
  56.  if (a.GetType("子例子") != null)
  57.         {
  58.             a.GetType("子例子").GetField("キスト", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "78171A0063B24DB3B3E#RND4@GN16#E7BE97D528879872");
  59.         }
  60.          if (a.GetType("子例子") != null)
  61.         {
  62.             a.GetType("子例子").GetField("スキト", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, "ERG34t3REGTHTRY#RND5@GN16#3C7A844B9CC6DE76");
  63.         }
  64.         ass[hash] = a;
  65.         return a;
  66.     }
  67.  internal static uint h(string s)
  68.     {
  69.         if (string.IsNullOrEmpty(s))
  70.             return 123;
  71.         int sind = 0;
  72.         int num = 0x15051505;
  73.         int num2 = num;
  74.         for (int i = s.Length; i > 0; i -= 4)
  75.         {
  76.             if (sind + 1 < s.Length) num = (((num << 5) + num) + (num >> 0x1b)) ^ ((int)s[sind] | (int)s[sind + 1] << 16);//(numPtr[0]);
  77.             else
  78.             {
  79.                 if (sind < s.Length) num = (((num << 5) + num) + (num >> 0x1b)) ^ ((int)s[sind]);//(numPtr[0]);
  80.                 else num = (((num << 5) + num) + (num >> 0x1b)) ^ (0);
  81.             }
  82.   if (i <= 2) break;
  83.  
  84.             sind += 2;
  85.             if (sind + 1 < s.Length) {num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ ((int)s[sind] | (int)s[sind + 1] << 16);}
  86.             else
  87.             {
  88.                 if (sind < s.Length) { num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ ((int)s[sind]);}
  89.                 else { num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ (0);}
  90.             }
  91.             sind += 2;
  92.         }
  93.         return (uint)(num + (num2 * 0x5d588b65));
  94.     }
  95.  internal static string hh(string s){ return string.Format("{0:X}", h(s));}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement