public byte[] decrypt(EmbeddedResource resource) { if (!CanDecrypt) throw new ApplicationException("Can't decrypt resources"); var encryptedData = resource.GetResourceData(); return decrypt(encryptedData); }
protected static byte[] DecryptResourceV3(EmbeddedResource resource) { return DecryptResourceV3(resource.GetResourceData()); }
protected static byte[] DecryptResourceV41SL(EmbeddedResource resource) { var data = resource.GetResourceData(); byte k = data[0]; for (int i = 0; i < data.Length - 1; i++) data[i + 1] ^= (byte)((k << (i & 5)) + i); return InflateIfNeeded(data, 1, data.Length - 1); }
public void Initialize() { if (installMethod == null) return; if (!FindKeys()) throw new ApplicationException("Could not find keys"); if ((resource = FindResource(key0)) == null) throw new ApplicationException("Could not find resource"); constants = DecryptResource(resource.GetResourceData()); FindDecrypters(); }
public void Initialize() { if (decryptMethod == null) return; resource = FindResource(decryptMethod); if (resource == null) throw new ApplicationException("Could not find encrypted strings resource"); reader = MemoryImageStream.Create(DeobUtils.Inflate(resource.GetResourceData(), true)); switch (version) { case ConfuserVersion.v10_r42915: case ConfuserVersion.v13_r55604_safe: decrypter = new Decrypter_v10_r42915(this); break; case ConfuserVersion.v10_r48832: decrypter = new Decrypter_v10_r48832(this); break; case ConfuserVersion.v11_r49299: case ConfuserVersion.v14_r58802_dynamic: decrypter = new Decrypter_v11_r49299(this); break; case ConfuserVersion.v14_r58802_safe: decrypter = new Decrypter_v10_r42915(this, (int)key1); break; default: throw new ApplicationException("Invalid version"); } }
public ImageResourceNode(ITreeNodeGroup treeNodeGroup, EmbeddedResource resource) : base(treeNodeGroup, resource) { this.imageData = resource.GetResourceData(); this.imageSource = ImageResourceUtils.CreateImageSource(this.imageData); }
byte[] Decrypt(EmbeddedResource resource) { var data = resource.GetResourceData(); switch (version) { case ConfuserVersion.v10_r42915: return Decrypt_v10_r42915(data); case ConfuserVersion.v10_r48717: return Decrypt_v10_r42915(data); case ConfuserVersion.v14_r57778: return Decrypt_v10_r42915(data); case ConfuserVersion.v14_r58564: return Decrypt_v14_r58564(data); case ConfuserVersion.v14_r58802: return Decrypt_v14_r58564(data); case ConfuserVersion.v14_r58852: return Decrypt_v14_r58852(data); case ConfuserVersion.v15_r60785: return Decrypt_v15_r60785(data); case ConfuserVersion.v17_r73404: return Decrypt_v17_r73404(data); case ConfuserVersion.v17_r73477: return Decrypt_v17_r73404(data); case ConfuserVersion.v17_r73566: return Decrypt_v17_r73404(data); case ConfuserVersion.v17_r75076: return Decrypt_v17_r75076(data); case ConfuserVersion.v18_r75184: return Decrypt_v17_r75076(data); case ConfuserVersion.v18_r75367: return Decrypt_v17_r75076(data); case ConfuserVersion.v19_r77172: return Decrypt_v17_r75076(data); default: throw new ApplicationException("Unknown version"); } }
public ImageResourceNodeImpl(ITreeNodeGroup treeNodeGroup, EmbeddedResource resource) : base(treeNodeGroup, resource) { imageData = resource.GetResourceData(); imageSource = ImageResourceUtilities.CreateImageSource(imageData); }
// 3.0.3.41 - 3.0.4.44 protected static byte[] decryptResourceV3Old(EmbeddedResource resource) { return decryptResourceV3Old(resource.GetResourceData()); }