MCPcopy Create free account
hub / github.com/GraxCode/zelixkiller / getIsolatedReturn

Method getIsolatedReturn

src/me/lpk/analysis/Sandbox.java:36–52  ·  view source on GitHub ↗

Invokes the method through reflection. Other methods and fields are removed to prevent accidental execution. @param owner Decryption classnode @param min Decryption method @param args Decryption method args @return

(ClassNode owner, MethodInsnNode min, Object[] args)

Source from the content-addressed store, hash-verified

34 * @return
35 */
36 public static Object getIsolatedReturn(ClassNode owner, MethodInsnNode min, Object[] args) {
37 if (owner == null) {
38 return null;
39 }
40 ClassNode isolated = new ClassNode();
41 isolated.version = 52;
42 isolated.name = owner.name;
43 isolated.superName = "java/lang/Object";
44 int i = 0;
45 for (MethodNode mn : owner.methods) {
46 if (mn.name.equals(min.name) && mn.desc.equals(min.desc)) {
47 isolated.methods.add(owner.methods.get(i));
48 }
49 i++;
50 }
51 return get(isolated, min.name, min.desc, args);
52 }
53
54 /**
55 * Simulates a method call from a given method. All methods are removed except the proxy call and the decrypt call.

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
equalsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected