Skip to content
Use a local instance of retdec to decompile functions in radare2
JavaScript Shell
Branch: master
Clone or download
securisec Merge pull request #8 from atti1a/no-debug
Add warning that r2retdec doesn't work in debug mode
Latest commit eb81943 Jul 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Mar 8, 2018
README.md . Jun 15, 2018
package.json initial commit Mar 16, 2018
r2pm_install.sh . May 3, 2018
r2retdec.js Add warning that r2retdec doesn't work in debug mode Jul 23, 2019
retdec_install.sh Mouse draggable, and python decompilation syntax. Updated readme. Rem… Mar 20, 2018

README.md

r2retdec

codebeat badge Twitter Follow Analytics repo size

r2retdec is a bridge in between radare2 and retdec and decompiles individual functions. It also provides summary of strings, xrefs and calls for a function. The various windows are mouse scrollable and draggable.

asciicast

Installation

Install from r2pm.

r2pm init
r2pm update
r2pm -i r2retdec
  • Create a file in $HOME call .r2retdec and put the full path to retdec-decompiler.sh in it.
  • A basic installation script is included in this repo. retdec_install.sh

Uninstallation

r2pm -u r2retdec

Usage

usage: $dec [-h] [-p] [-t FILE]

r2retdec help

Optional arguments:
  -h, --help  Show this help message and exit.
  -t TMP      Set temp file for decompiled code
  -p          Print dicompilation to stdout
  --python    Print decompilation in python syntax. Default is C

Invoke from inside r2 shell with $dec
  • Press h in visual mode for visual mode help

Dependencies

Needs a locally compiled retdec available from https://github.com/avast-tl/retdec

Tested with

  • Node version 8 and 9
  • Ubuntu 16.04 Vagrant
  • Mac OSX 10.12

Supported architectures

(32b only): Intel x86, ARM, MIPS, PIC32, and PowerPC.

You can’t perform that action at this time.