Occasionaly I decompile Python code, with decompilers written in Python. Recently I discovered Decompyle++, a Python disassembler & decompiler written in C++.
It’s very easy to compile for Linux, but a bit more difficult for Windows.
This is how I compiled Decompyle++ on Windows:
I used Microsoft Visual Studio Community 2022.
First I launch the Visual Studio 2022 Developer Command Prompt:
Then I download Decompyle++’s source code and navigate to the containing directory.
There I launch this command: cmake .
And then I can start compilation (I’m compiling the Release configuration): msbuild pycdc.sln -t:Rebuild -p:Configuration=Release
And then I can find the disassembler (pycdas.exe) and decompiler (pycdc.exe) in the Release folder:
Here I use pycdc.exe to decompile a .pyc file:
In case you can’t or don’t want to compile this yourself, I’m sharing the executables I compiled here.
Didier Stevens
Senior handler
blog.DidierStevens.com