The retdec.com decompilation service is to be disabled (see the official announcement). This will render the library and tools in the present repository non-functional. I will keep the repository online in case it is helpful to anyone.
You can either incorporate the library in your own scripts:
from retdec.decompiler import Decompiler decompiler = Decompiler(api_key='YOUR-API-KEY') decompilation = decompiler.start_decompilation(input_file='file.exe') decompilation.wait_until_finished() decompilation.save_hll_code()
or you can use the provided script for stand-alone decompilations:
$ decompiler -k YOUR-API-KEY file.exe v23bmYb67R ---------- Waiting for resources (0%)... [OK] Pre-Processing: Obtaining file information (5%)... [OK] Unpacking (10%)... [OK] Front-End: Initializing (20%)... [OK] [..] Done (100%)... Downloading: - file.c
file.c then contains the decompiled C code:
$ cat file.c // // This file was generated by the Retargetable Decompiler // Website: https://retdec.com // Copyright (c) 2016 Retargetable Decompiler <firstname.lastname@example.org> // #include <stdio.h> [..]
$ pip install retdec-python
This will install the latest stable version, including all dependencies. You can also install the latest development version directly from GitHub:
$ pip install git+https://github.com/s3rvac/retdec-python
The documentation is available on readthedocs.io:
Contact and Support
Copyright (c) 2015 Petr Zemek (email@example.com) and contributors.
Distributed under the MIT license. See the LICENSE file for more details.
Access from Other Languages
If you want to access the retdec.com decompilation service from other languages, check out the following projects: