diff --git a/deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/hp888/HP888PackerTransformer.java b/deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/hp888/HP888PackerTransformer.java index d8e0e70..a25394c 100644 --- a/deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/hp888/HP888PackerTransformer.java +++ b/deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/hp888/HP888PackerTransformer.java @@ -53,17 +53,18 @@ protected void transform() throws Exception { cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(Base64.getDecoder().decode(key.get()), "AES")); context().getFiles().forEach((file, bytes) -> { if (file.endsWith(encryptedClassFilesSuffix)) { - String cleanFileName = file.replace(encryptedClassFilesSuffix, "").replace(".", "/"); filesToRemove.add(file); + + String className = file.replace(encryptedClassFilesSuffix, "").replace(".", "/"); try { // Decrypt! byte[] decrypted = cipher.doFinal(bytes); // Load class - newClasses.put(cleanFileName, ClassHelper.loadUnknownClass(cleanFileName, decrypted, ClassReader.SKIP_FRAMES)); + newClasses.put(className, ClassHelper.loadUnknownClass(className + ".class", decrypted, ClassReader.SKIP_FRAMES)); markChange(); } catch (Exception e) { - LOGGER.error(e); + throw new RuntimeException("Failed to decrypt class: " + className, e); } } });