def get_decompile_interface(): # type: () -> DecompInterface interface = DecompInterface() options = DecompileOptions() interface.setOptions(options) interface.openProgram(currentProgram) interface.setSimplificationStyle("decompile") return interface
def _decompiler(): ifc = DecompInterface() DecOptions = DecompileOptions() service = state.getTool().getService(OptionsService) opt = service.getOptions("Decompiler") DecOptions.grabFromToolAndProgram(None, opt, currentProgram) ifc.setOptions(DecOptions) ifc.toggleCCode(True) ifc.toggleSyntaxTree(True) ifc.setSimplificationStyle("decompile") ifc.openProgram(currentProgram) return ifc
def generate_decomp_interface(): decompiler = DecompInterface() opts = DecompileOptions() opts.grabFromProgram(curr) decompiler.setOptions(opts) decompiler.toggleCCode(True) decompiler.toggleSyntaxTree(True) # - decompile -- The main decompiler action # - normalize -- Decompilation tuned for normalization # - jumptable -- Simplify just enough to recover a jump-table # - paramid -- Simplify enough to recover function parameters # - register -- Perform one analysis pass on registers, without stack variables # - firstpass -- Construct the initial raw syntax tree, with no simplification decompiler.setSimplificationStyle("decompile") decompiler.openProgram(curr) return decompiler
def get_decompiler(state, program): tool = state.getTool() options = DecompileOptions() decomp = DecompInterface() if tool is not None: service = tool.getService(OptionsService) if service is not None: opt = service.getOptions("Decompiler") options.grabFromToolAndProgram(None, opt, program) decomp.setOptions(options) decomp.toggleCCode(True) decomp.toggleSyntaxTree(True) decomp.setSimplificationStyle("decompile") return decomp