Пример #1
0
        byte[] GetKey_v17_r74788(DecrypterInfoV17 info)
        {
            var key = module.ReadBlob(info.decryptMethod.MDToken.ToUInt32() ^ info.key5);

            if (key.Length != keyArraySize)
            {
                throw new ApplicationException("Invalid key size");
            }
            return(key);
        }
Пример #2
0
        byte[] DecryptConstant(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode)
        {
            switch (info.version)
            {
            case ConfuserVersion.v17_r74708_normal: return(DecryptConstant_v17_r74708_normal(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74708_dynamic: return(DecryptConstant_v17_r74708_dynamic(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74708_native: return(DecryptConstant_v17_r74708_native(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74788_normal: return(DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74788_dynamic: return(DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74788_native: return(DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74816_normal: return(DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74816_dynamic: return(DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r74816_native: return(DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r75056_normal: return(DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r75056_dynamic: return(DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode));

            case ConfuserVersion.v17_r75056_native: return(DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode));

            case ConfuserVersion.v18_r75257_normal: return(DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode));

            case ConfuserVersion.v18_r75257_dynamic: return(DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode));

            case ConfuserVersion.v18_r75257_native: return(DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode));

            default:
                throw new ApplicationException("Invalid version");
            }
        }
Пример #3
0
        void FindDecrypterInfos()
        {
            foreach (var type in module.Types)
            {
                if (type.Attributes != (TypeAttributes.Abstract | TypeAttributes.Sealed))
                {
                    continue;
                }
                if (!CheckMethods(type.Methods))
                {
                    continue;
                }
                foreach (var method in type.Methods)
                {
                    if (!DotNetUtils.IsMethod(method, "System.Object", "(System.UInt32,System.UInt32)"))
                    {
                        continue;
                    }

                    var info = new DecrypterInfoV17(version, method);
                    Add(info);
                }
            }
        }
Пример #4
0
 byte[] DecryptConstant_v17_r74788_native(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) =>
 DecryptConstant_v17_r73764_native(info, encrypted, offs, info.key4, GetKey_v17_r74788(info));
Пример #5
0
 byte[] DecryptConstant_v17_r74788_dynamic(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) =>
 DecryptConstant_v17_r73740_dynamic(info, encrypted, offs, info.key4, GetKey_v17_r74788(info));
Пример #6
0
 byte[] DecryptConstant_v17_r74788_normal(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) =>
 ConfuserUtils.Decrypt(info.key4 * (offs + typeCode), encrypted, GetKey_v17_r74788(info));
Пример #7
0
 byte[] DecryptConstant_v17_r74708_dynamic(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode)
 {
     return(DecryptConstant_v17_r73740_dynamic(info, encrypted, offs, info.key4));
 }
Пример #8
0
 byte[] DecryptConstant_v17_r74708_native(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode)
 {
     return(DecryptConstant_v17_r73764_native(info, encrypted, offs, info.key4));
 }
		void FindDecrypterInfos() {
			foreach (var type in module.Types) {
				if (type.Attributes != (TypeAttributes.Abstract | TypeAttributes.Sealed))
					continue;
				if (!CheckMethods(type.Methods))
					continue;
				foreach (var method in type.Methods) {
					if (!DotNetUtils.IsMethod(method, "System.Object", "(System.UInt32,System.UInt32)"))
						continue;

					var info = new DecrypterInfoV17(version, method);
					Add(info);
				}
			}
		}
Пример #10
0
 byte[] DecryptConstant_v17_r74708_normal(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode)
 {
     return(ConfuserUtils.Decrypt(info.key4 * (offs + typeCode), encrypted));
 }
Пример #11
0
		byte[] GetKey_v17_r74788(DecrypterInfoV17 info) {
			var key = module.ReadBlob(info.decryptMethod.MDToken.ToUInt32() ^ info.key5);
			if (key.Length != keyArraySize)
				throw new ApplicationException("Invalid key size");
			return key;
		}
Пример #12
0
		byte[] DecryptConstant_v17_r74788_native(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) {
			return DecryptConstant_v17_r73764_native(info, encrypted, offs, info.key4, GetKey_v17_r74788(info));
		}
Пример #13
0
		byte[] DecryptConstant_v17_r74788_normal(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) {
			return ConfuserUtils.Decrypt(info.key4 * (offs + typeCode), encrypted, GetKey_v17_r74788(info));
		}
Пример #14
0
		byte[] DecryptConstant_v17_r74708_dynamic(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) {
			return DecryptConstant_v17_r73740_dynamic(info, encrypted, offs, info.key4);
		}
Пример #15
0
		byte[] DecryptConstant(DecrypterInfoV17 info, byte[] encrypted, uint offs, byte typeCode) {
			switch (info.version) {
			case ConfuserVersion.v17_r74708_normal: return DecryptConstant_v17_r74708_normal(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74708_dynamic: return DecryptConstant_v17_r74708_dynamic(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74708_native: return DecryptConstant_v17_r74708_native(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74788_normal: return DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74788_dynamic: return DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74788_native: return DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74816_normal: return DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74816_dynamic: return DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r74816_native: return DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r75056_normal: return DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r75056_dynamic: return DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode);
			case ConfuserVersion.v17_r75056_native: return DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode);
			case ConfuserVersion.v18_r75257_normal: return DecryptConstant_v17_r74788_normal(info, encrypted, offs, typeCode);
			case ConfuserVersion.v18_r75257_dynamic: return DecryptConstant_v17_r74788_dynamic(info, encrypted, offs, typeCode);
			case ConfuserVersion.v18_r75257_native: return DecryptConstant_v17_r74788_native(info, encrypted, offs, typeCode);
			default:
				throw new ApplicationException("Invalid version");
			}
		}