Skip to content

Commit

Permalink
some more work
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicPlayerA10 committed Sep 12, 2024
1 parent d6a85fd commit 88550e3
Show file tree
Hide file tree
Showing 6 changed files with 4,994 additions and 4,994 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public static ClassWrapper loadClass(String path, byte[] bytes, int classReaderF
* @param fix Fix class using CAFED00D
*/
public static ClassWrapper loadClass(String path, byte[] bytes, int classReaderFlags, int classWriterFlags, boolean fix) throws Exception {
return new ClassWrapper(path, new ClassReader(fix ? fixClass(bytes) : bytes), classReaderFlags, classWriterFlags);
// Fix class
bytes = fix ? fixClass(bytes) : bytes;

return new ClassWrapper(path, new ClassReader(bytes), classReaderFlags, classWriterFlags);
}

public static byte[] fixClass(byte[] bytes) throws InvalidClassException {
Expand All @@ -51,13 +54,6 @@ public static byte[] fixClass(byte[] bytes) throws InvalidClassException {
return bytes;
}

public static byte[] classToBytes(ClassNode classNode, int writerMode) {
ClassWriter classWriter = new ClassWriter(writerMode);
classNode.accept(classWriter);

return classWriter.toByteArray();
}

public static ClassNode copy(ClassNode classNode) {
if (classNode == null) return null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package uwu.narumi.deobfuscator.api.library;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public interface ILongDecrypter {
void setParent(ILongDecrypter parent);

int[] getNumberPool();
int[] getEncryptionInts();

long decrypt(long decryptKey);

Expand Down
Loading

0 comments on commit 88550e3

Please sign in to comment.