dumper.java code is copied from Reversing an obfuscated java malware by Extreme Coders
Uploaded the jar file generated using following cmds:
javac dumper.java jar cmf MANIFEST.MF dumper.jar dumper.class transformer.class
To dump the class file of malware.jar:
java -javaagent:dumper.jar -jar malware.jar
Important note: Another important point is there must be a new line at the end of the MANIFEST file. Otherwise, the last header is ignored.