Skip to content
Go to file


Failed to load latest commit information.
Latest commit message
Commit time



The decompilation service is to be disabled (see the official announcement). This will render the scripts in the present repository non-functional. I will keep the repository online in case it is helpful to anyone.


Shell scripts for decompiling and analyzing binary files through the decompilation service by using their public REST API.

Two scripts are provided:

  • - Analyzes the given binary file and prints the obtained information to the standard output:

      $ scripts/ --api-key YOUR-API-KEY file.exe
      Input file               : file.exe
      File format              : PE
      File class               : 32-bit
      File type                : Executable file
      Architecture             : x86 (or later and compatible)
  • - Decompiles the given binary file and downloads the decompiled C source code:

      $ scripts/ --api-key YOUR-API-KEY file.exe
      $ cat file.c
      // This file was generated by the Retargetable Decompiler
      // Website:
      // Copyright (c) 2015 Retargetable Decompiler <>

Development Status

Although the very basic functionality is there, more features are under development.

For a list of changes, see the CHANGELOG file.


  • shell (bash, dash, ...)
  • curl

The scripts should work with any POSIX shell, although they have been tested only on bash and dash.


Simply copy the scripts from the scripts directory to your machine, either directly or by cloning this repository.


Since the scripts use the API, you need to provide them your API key. The API key can be obtained by registering at After logging in, go to your account, where you can generate an API key). After you have an API key, either pass it by using the -a/--api-key parameter, or set the RETDEC_API_KEY environment variable.


scripts/{fileinfo,decompile}.sh [OPTIONS] FILE

For a detailed list of available options, run the scripts with the -h/--help parameter.

Exit Codes

The scripts may exit with the following codes.

  • 0 - everything went OK,
  • 1 - either curl is not installed or the given script parameters are invalid,
  • 2 - there was an error during script runtime (e.g. a decompilation failed).


Contributions are welcomed as pull requests.

Bug Reporting

If you have found a bug, please report it by opening an issue.


Copyright (c) 2015 Petr Zemek ( and contributors.

Distributed under the MIT license. See the LICENSE file for more details.

Access from Other Languages

If you want to access the decompilation service from other languages, check out the following projects:

  • retdec-python - A library and tools for accessing the service from Python.
  • retdec-rust - A library and tools for accessing the service from Rust.
  • retdec-cpp - A library and tools for accessing the service from C++.


Shell scripts for decompiling and analyzing binary files through the REST API.





You can’t perform that action at this time.