Rename deob to deob-bytecode

This is in preparation for adding a new deob module which invokes the
bytecode deobfuscator, decompiler and AST deobfuscator in turn.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent ded1d99924
commit 3cb7ee13f9
  1. 6
      .idea/runConfigurations/BytecodeDeobfuscator.xml
  2. 2
      all/build.gradle.kts
  3. 4
      all/src/main/kotlin/org/openrs2/Command.kt
  4. 2
      deob-bytecode/build.gradle.kts
  5. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/ArgPartition.kt
  6. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/ArgRef.kt
  7. 8
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/BytecodeDeobfuscator.kt
  8. 62
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/BytecodeDeobfuscatorModule.kt
  9. 18
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/DeobfuscateBytecodeCommand.kt
  10. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/DeobfuscatorQualifier.kt
  11. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/OriginalPcTable.kt
  12. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/Profile.kt
  13. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/ProfileProvider.kt
  14. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/SignedClassUtils.kt
  15. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/ConstSourceInterpreter.kt
  16. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/ConstSourceValue.kt
  17. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/ControlFlowAnalyzer.kt
  18. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/CopyAssignment.kt
  19. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/CopyPropagationAnalyzer.kt
  20. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/DataFlowAnalyzer.kt
  21. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/FieldWriteAnalyzer.kt
  22. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/FieldWriteCount.kt
  23. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/IntBranch.kt
  24. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/IntBranchResult.kt
  25. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/IntInterpreter.kt
  26. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/IntValue.kt
  27. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/IntValueSet.kt
  28. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/LiveVariableAnalyzer.kt
  29. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/ThisInterpreter.kt
  30. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/analysis/ThisValue.kt
  31. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/filter/ReflectedConstructorFilter.kt
  32. 4
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/ArgumentMappingGenerator.kt
  33. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/ClassMappingGenerator.kt
  34. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/ClassNamePrefix.kt
  35. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/FieldMappingGenerator.kt
  36. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/MethodMappingGenerator.kt
  37. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/NameGenerator.kt
  38. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/StaticClassMapping.kt
  39. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/StaticField.kt
  40. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/StaticFieldUnscrambler.kt
  41. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/StaticMethodUnscrambler.kt
  42. 6
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/remap/TypedRemapper.kt
  43. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/BitShiftTransformer.kt
  44. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/BitwiseOpTransformer.kt
  45. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/CanvasTransformer.kt
  46. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/ClassLiteralTransformer.kt
  47. 20
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/ConstantArgTransformer.kt
  48. 4
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/CopyPropagationTransformer.kt
  49. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/CounterTransformer.kt
  50. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/EmptyClassTransformer.kt
  51. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/ExceptionTracingTransformer.kt
  52. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FernflowerExceptionTransformer.kt
  53. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FieldOrderTransformer.kt
  54. 8
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalFieldTransformer.kt
  55. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalTransformer.kt
  56. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/InvokeSpecialTransformer.kt
  57. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/MethodOrderTransformer.kt
  58. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/MonitorTransformer.kt
  59. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/OpaquePredicateTransformer.kt
  60. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/OriginalNameTransformer.kt
  61. 4
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/OriginalPcRestoreTransformer.kt
  62. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/OriginalPcSaveTransformer.kt
  63. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/OverrideTransformer.kt
  64. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/PatcherTransformer.kt
  65. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/RedundantGotoTransformer.kt
  66. 6
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/RemapTransformer.kt
  67. 2
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/ResetTransformer.kt
  68. 12
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/UnusedArgTransformer.kt
  69. 4
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/UnusedLocalTransformer.kt
  70. 6
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/UnusedMethodTransformer.kt
  71. 8
      deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/VisibilityTransformer.kt
  72. 18
      deob/src/main/kotlin/org/openrs2/deob/DeobfuscateCommand.kt
  73. 2
      settings.gradle.kts

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Deobfuscator" type="JetRunConfigurationType">
<module name="openrs2.deob.main" />
<configuration default="false" name="BytecodeDeobfuscator" type="JetRunConfigurationType">
<module name="openrs2.deob-bytecode.main" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.deob.DeobfuscateCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.deob.bytecode.DeobfuscateBytecodeCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -19,8 +19,8 @@ dependencies {
implementation(project(":compress-cli"))
implementation(project(":crc32"))
implementation(project(":decompiler"))
implementation(project(":deob"))
implementation(project(":deob-ast"))
implementation(project(":deob-bytecode"))
implementation(project(":game"))
implementation(project(":patcher"))
}

@ -6,8 +6,8 @@ import org.openrs2.archive.ArchiveCommand
import org.openrs2.compress.cli.CompressCommand
import org.openrs2.crc32.Crc32Command
import org.openrs2.decompiler.DecompileCommand
import org.openrs2.deob.DeobfuscateCommand
import org.openrs2.deob.ast.DeobfuscateAstCommand
import org.openrs2.deob.bytecode.DeobfuscateBytecodeCommand
import org.openrs2.game.GameCommand
import org.openrs2.patcher.PatchCommand
@ -20,8 +20,8 @@ public class Command : NoOpCliktCommand(name = "openrs2") {
CompressCommand(),
Crc32Command(),
DecompileCommand(),
DeobfuscateCommand(),
DeobfuscateAstCommand(),
DeobfuscateBytecodeCommand(),
GameCommand(),
PatchCommand()
)

@ -5,7 +5,7 @@ plugins {
}
application {
mainClass.set("org.openrs2.deob.DeobfuscateCommandKt")
mainClass.set("org.openrs2.deob.bytecode.DeobfuscateBytecodeCommandKt")
}
dependencies {

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import org.openrs2.asm.MemberRef
import org.openrs2.util.collect.DisjointSet

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import org.openrs2.asm.MemberRef

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import com.github.michaelbull.logging.InlineLogger
import org.openrs2.asm.classpath.ClassPath
@ -7,15 +7,15 @@ import org.openrs2.asm.io.JarLibraryReader
import org.openrs2.asm.io.JarLibraryWriter
import org.openrs2.asm.io.Pack200LibraryReader
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.remap.ClassNamePrefixRemapper
import org.openrs2.deob.remap.StripClassNamePrefixRemapper
import org.openrs2.deob.bytecode.remap.ClassNamePrefixRemapper
import org.openrs2.deob.bytecode.remap.StripClassNamePrefixRemapper
import java.nio.file.Files
import java.nio.file.Path
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
public class Deobfuscator @Inject constructor(
public class BytecodeDeobfuscator @Inject constructor(
@DeobfuscatorQualifier private val transformers: Set<Transformer>
) {
public fun run(input: Path, output: Path) {

@ -1,43 +1,43 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import com.google.inject.AbstractModule
import com.google.inject.Scopes
import com.google.inject.multibindings.Multibinder
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.transform.BitShiftTransformer
import org.openrs2.deob.transform.BitwiseOpTransformer
import org.openrs2.deob.transform.CanvasTransformer
import org.openrs2.deob.transform.ClassLiteralTransformer
import org.openrs2.deob.transform.ConstantArgTransformer
import org.openrs2.deob.transform.CopyPropagationTransformer
import org.openrs2.deob.transform.CounterTransformer
import org.openrs2.deob.transform.EmptyClassTransformer
import org.openrs2.deob.transform.ExceptionTracingTransformer
import org.openrs2.deob.transform.FernflowerExceptionTransformer
import org.openrs2.deob.transform.FieldOrderTransformer
import org.openrs2.deob.transform.FinalFieldTransformer
import org.openrs2.deob.transform.FinalTransformer
import org.openrs2.deob.transform.InvokeSpecialTransformer
import org.openrs2.deob.transform.MethodOrderTransformer
import org.openrs2.deob.transform.MonitorTransformer
import org.openrs2.deob.transform.OpaquePredicateTransformer
import org.openrs2.deob.transform.OriginalNameTransformer
import org.openrs2.deob.transform.OriginalPcRestoreTransformer
import org.openrs2.deob.transform.OriginalPcSaveTransformer
import org.openrs2.deob.transform.OverrideTransformer
import org.openrs2.deob.transform.PatcherTransformer
import org.openrs2.deob.transform.RedundantGotoTransformer
import org.openrs2.deob.transform.RemapTransformer
import org.openrs2.deob.transform.ResetTransformer
import org.openrs2.deob.transform.UnusedArgTransformer
import org.openrs2.deob.transform.UnusedLocalTransformer
import org.openrs2.deob.transform.UnusedMethodTransformer
import org.openrs2.deob.transform.VisibilityTransformer
import org.openrs2.deob.bytecode.transform.BitShiftTransformer
import org.openrs2.deob.bytecode.transform.BitwiseOpTransformer
import org.openrs2.deob.bytecode.transform.CanvasTransformer
import org.openrs2.deob.bytecode.transform.ClassLiteralTransformer
import org.openrs2.deob.bytecode.transform.ConstantArgTransformer
import org.openrs2.deob.bytecode.transform.CopyPropagationTransformer
import org.openrs2.deob.bytecode.transform.CounterTransformer
import org.openrs2.deob.bytecode.transform.EmptyClassTransformer
import org.openrs2.deob.bytecode.transform.ExceptionTracingTransformer
import org.openrs2.deob.bytecode.transform.FernflowerExceptionTransformer
import org.openrs2.deob.bytecode.transform.FieldOrderTransformer
import org.openrs2.deob.bytecode.transform.FinalFieldTransformer
import org.openrs2.deob.bytecode.transform.FinalTransformer
import org.openrs2.deob.bytecode.transform.InvokeSpecialTransformer
import org.openrs2.deob.bytecode.transform.MethodOrderTransformer
import org.openrs2.deob.bytecode.transform.MonitorTransformer
import org.openrs2.deob.bytecode.transform.OpaquePredicateTransformer
import org.openrs2.deob.bytecode.transform.OriginalNameTransformer
import org.openrs2.deob.bytecode.transform.OriginalPcRestoreTransformer
import org.openrs2.deob.bytecode.transform.OriginalPcSaveTransformer
import org.openrs2.deob.bytecode.transform.OverrideTransformer
import org.openrs2.deob.bytecode.transform.PatcherTransformer
import org.openrs2.deob.bytecode.transform.RedundantGotoTransformer
import org.openrs2.deob.bytecode.transform.RemapTransformer
import org.openrs2.deob.bytecode.transform.ResetTransformer
import org.openrs2.deob.bytecode.transform.UnusedArgTransformer
import org.openrs2.deob.bytecode.transform.UnusedLocalTransformer
import org.openrs2.deob.bytecode.transform.UnusedMethodTransformer
import org.openrs2.deob.bytecode.transform.VisibilityTransformer
import org.openrs2.deob.util.DeobfuscatorUtilModule
import org.openrs2.patcher.PatcherModule
import org.openrs2.patcher.transform.ResourceTransformer
public object DeobfuscatorModule : AbstractModule() {
public object BytecodeDeobfuscatorModule : AbstractModule() {
override fun configure() {
install(PatcherModule)
install(DeobfuscatorUtilModule)

@ -0,0 +1,18 @@
package org.openrs2.deob.bytecode
import com.github.ajalt.clikt.core.CliktCommand
import com.google.inject.Guice
import java.nio.file.Paths
public fun main(args: Array<String>): Unit = DeobfuscateBytecodeCommand().main(args)
public class DeobfuscateBytecodeCommand : CliktCommand(name = "deob-bytecode") {
override fun run() {
val injector = Guice.createInjector(BytecodeDeobfuscatorModule)
val deobfuscator = injector.getInstance(BytecodeDeobfuscator::class.java)
deobfuscator.run(
input = Paths.get("nonfree/share/client"),
output = Paths.get("nonfree/var/cache/deob")
)
}
}

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import org.objectweb.asm.Attribute
import org.objectweb.asm.ByteVector

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import org.openrs2.asm.filter.GlobClassFilter
import org.openrs2.asm.filter.GlobMemberFilter

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import com.fasterxml.jackson.databind.ObjectMapper
import org.openrs2.yaml.Yaml

@ -1,4 +1,4 @@
package org.openrs2.deob
package org.openrs2.deob.bytecode
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.analysis.BasicValue

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.jgrapht.Graph
import org.jgrapht.graph.AsUnmodifiableGraph

@ -1,3 +1,3 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
public data class CopyAssignment(val destination: Int, val source: Int)

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.jgrapht.Graph
import org.jgrapht.graph.DefaultEdge

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
public enum class FieldWriteCount {
NEVER,

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes.IFEQ
import org.objectweb.asm.Opcodes.IFGE

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
public enum class IntBranchResult {
ALWAYS_TAKEN, NEVER_TAKEN, UNKNOWN;

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.tree.analysis.BasicValue
import org.objectweb.asm.tree.analysis.Value

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
public sealed class IntValueSet {
public data class Constant(val values: Set<Int>) : IntValueSet() {

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import it.unimi.dsi.fastutil.ints.IntOpenHashSet
import it.unimi.dsi.fastutil.ints.IntSet

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package org.openrs2.deob.analysis
package org.openrs2.deob.bytecode.analysis
import org.objectweb.asm.tree.analysis.BasicValue
import org.objectweb.asm.tree.analysis.Value

@ -1,4 +1,4 @@
package org.openrs2.deob.filter
package org.openrs2.deob.bytecode.filter
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.tree.MethodNode

@ -1,6 +1,6 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.openrs2.deob.ArgRef
import org.openrs2.deob.bytecode.ArgRef
import org.openrs2.deob.util.map.NameMap
public class ArgumentMappingGenerator(

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.Opcodes
import org.openrs2.asm.classpath.ClassMetadata

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.openrs2.asm.classpath.ExtendedRemapper
import org.openrs2.asm.classpath.Library

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.Type
import org.openrs2.asm.MemberRef

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.Opcodes
import org.openrs2.asm.MemberDesc

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
public class NameGenerator {
private val prefixes = mutableMapOf<String, Int>()

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
public class StaticClassMapping {
private val nameGenerator = NameGenerator()

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import org.objectweb.asm.Opcodes
import org.openrs2.asm.MemberRef

@ -1,12 +1,12 @@
package org.openrs2.deob.remap
package org.openrs2.deob.bytecode.remap
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.tree.AbstractInsnNode
import org.openrs2.asm.MemberRef
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.ExtendedRemapper
import org.openrs2.deob.ArgRef
import org.openrs2.deob.Profile
import org.openrs2.deob.bytecode.ArgRef
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.util.map.NameMap
import org.openrs2.util.collect.DisjointSet

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes.GOTO
@ -36,15 +36,15 @@ import org.openrs2.asm.replaceExpression
import org.openrs2.asm.stackMetadata
import org.openrs2.asm.toAbstractInsnNode
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.ArgPartition
import org.openrs2.deob.Profile
import org.openrs2.deob.analysis.IntBranch
import org.openrs2.deob.analysis.IntBranchResult.ALWAYS_TAKEN
import org.openrs2.deob.analysis.IntBranchResult.NEVER_TAKEN
import org.openrs2.deob.analysis.IntInterpreter
import org.openrs2.deob.analysis.IntValueSet
import org.openrs2.deob.filter.ReflectedConstructorFilter
import org.openrs2.deob.remap.MethodMappingGenerator
import org.openrs2.deob.bytecode.ArgPartition
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.bytecode.analysis.IntBranch
import org.openrs2.deob.bytecode.analysis.IntBranchResult.ALWAYS_TAKEN
import org.openrs2.deob.bytecode.analysis.IntBranchResult.NEVER_TAKEN
import org.openrs2.deob.bytecode.analysis.IntInterpreter
import org.openrs2.deob.bytecode.analysis.IntValueSet
import org.openrs2.deob.bytecode.filter.ReflectedConstructorFilter
import org.openrs2.deob.bytecode.remap.MethodMappingGenerator
import org.openrs2.util.collect.DisjointSet
import org.openrs2.util.collect.removeFirstOrNull
import javax.inject.Inject

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes
@ -8,7 +8,7 @@ import org.objectweb.asm.tree.VarInsnNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.analysis.CopyPropagationAnalyzer
import org.openrs2.deob.bytecode.analysis.CopyPropagationAnalyzer
import javax.inject.Singleton
/**

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes
@ -13,9 +13,9 @@ import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.removeDeadCode
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.analysis.FieldWriteAnalyzer
import org.openrs2.deob.analysis.FieldWriteCount
import org.openrs2.deob.analysis.ThisInterpreter
import org.openrs2.deob.bytecode.analysis.FieldWriteAnalyzer
import org.openrs2.deob.bytecode.analysis.FieldWriteCount
import org.openrs2.deob.bytecode.analysis.ThisInterpreter
import org.openrs2.util.collect.DisjointSet
import javax.inject.Singleton

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import org.objectweb.asm.Type
import org.objectweb.asm.tree.AnnotationNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Type
@ -10,8 +10,8 @@ import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.removeDeadCode
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.OriginalPcTable
import org.openrs2.deob.annotation.OriginalMember
import org.openrs2.deob.bytecode.OriginalPcTable
import org.openrs2.deob.util.map.NameMap
import javax.inject.Inject
import javax.inject.Singleton

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.tree.ClassNode

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.openrs2.asm.classpath.ClassPath

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,9 +1,9 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.Profile
import org.openrs2.deob.remap.TypedRemapper
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.bytecode.remap.TypedRemapper
import org.openrs2.deob.util.map.NameMap
import javax.inject.Inject
import javax.inject.Singleton

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes
@ -17,11 +17,11 @@ import org.openrs2.asm.classpath.Library
import org.openrs2.asm.hasCode
import org.openrs2.asm.removeArgument
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.ArgPartition
import org.openrs2.deob.Profile
import org.openrs2.deob.analysis.ConstSourceInterpreter
import org.openrs2.deob.analysis.ConstSourceValue
import org.openrs2.deob.remap.MethodMappingGenerator
import org.openrs2.deob.bytecode.ArgPartition
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.bytecode.analysis.ConstSourceInterpreter
import org.openrs2.deob.bytecode.analysis.ConstSourceValue
import org.openrs2.deob.bytecode.remap.MethodMappingGenerator
import org.openrs2.util.collect.DisjointSet
import javax.inject.Inject
import javax.inject.Singleton

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import org.objectweb.asm.Opcodes
@ -11,7 +11,7 @@ import org.openrs2.asm.classpath.Library
import org.openrs2.asm.deleteExpression
import org.openrs2.asm.isPure
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.analysis.LiveVariableAnalyzer
import org.openrs2.deob.bytecode.analysis.LiveVariableAnalyzer
import javax.inject.Singleton
@Singleton

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import com.google.common.collect.HashMultimap
@ -13,8 +13,8 @@ import org.openrs2.asm.classpath.Library
import org.openrs2.asm.filter.MemberFilter
import org.openrs2.asm.filter.UnionMemberFilter
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.Profile
import org.openrs2.deob.filter.ReflectedConstructorFilter
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.bytecode.filter.ReflectedConstructorFilter
import org.openrs2.util.collect.DisjointSet
import org.openrs2.util.collect.removeFirst
import javax.inject.Inject

@ -1,4 +1,4 @@
package org.openrs2.deob.transform
package org.openrs2.deob.bytecode.transform
import com.github.michaelbull.logging.InlineLogger
import com.google.common.collect.HashMultimap
@ -16,8 +16,8 @@ import org.openrs2.asm.classpath.Library
import org.openrs2.asm.filter.MemberFilter
import org.openrs2.asm.filter.UnionMemberFilter
import org.openrs2.asm.transform.Transformer
import org.openrs2.deob.Profile
import org.openrs2.deob.filter.ReflectedConstructorFilter
import org.openrs2.deob.bytecode.Profile
import org.openrs2.deob.bytecode.filter.ReflectedConstructorFilter
import org.openrs2.util.collect.DisjointSet
import javax.inject.Inject
import javax.inject.Singleton
@ -91,7 +91,7 @@ public class VisibilityTransformer @Inject constructor(private val profile: Prof
// reduce it to the weakest level required to override a dependency's method
partition.filter { classPath[it.owner]!!.dependency }
.mapNotNull { classPath[it.owner]!!.getMethodAccess(MemberDesc(it)) }
.fold(visibility, ::weakestVisibility)
.fold(visibility, Companion::weakestVisibility)
} else {
visibility
}

@ -1,18 +0,0 @@
package org.openrs2.deob
import com.github.ajalt.clikt.core.CliktCommand
import com.google.inject.Guice
import java.nio.file.Paths
public fun main(args: Array<String>): Unit = DeobfuscateCommand().main(args)
public class DeobfuscateCommand : CliktCommand(name = "deob") {
override fun run() {
val injector = Guice.createInjector(DeobfuscatorModule)
val deobfuscator = injector.getInstance(Deobfuscator::class.java)
deobfuscator.run(
input = Paths.get("nonfree/share/client"),
output = Paths.get("nonfree/var/cache/deob")
)
}
}

@ -13,9 +13,9 @@ include(
"crypto",
"db",
"decompiler",
"deob",
"deob-annotations",
"deob-ast",
"deob-bytecode",
"deob-processor",
"deob-util",
"game",

Loading…
Cancel
Save