Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

IDA Export All Decompiled

An IDAPython script that automatically decompiles and exports all functions in an IDA database into multiple C/C++ source files. The script intelligently recreates the directory structure based on the Functions tree (folders) in IDA, keeping your decompiled code organized.

Features

  • Folder Structure Preservation: Recreates the folder hierarchy from IDA's Functions tree directly into the output directory.
  • Batch Decompilation: Leverages the Hex-Rays Decompiler to decompile all functions in bulk.
  • Unmapped Functions Handling: Functions that don't belong to any specific folder or source file are cleanly grouped into an _unmapped.cpp file.
  • Customizable: Allows enabling/disabling the export of library functions and toggling silent mode to suppress Hex-Rays batch messages.

Requirements

  • IDA Pro 8.x or 9.x.
  • A Hex-Rays Decompiler matching the architecture of the binary being analyzed (e.g., x86, x64, ARM).

How to Use

  1. Open your target binary in IDA Pro.
  2. Wait for IDA's auto-analysis to complete.
  3. Go to File -> Script file... (or press Alt-F7) and select ida_export_all_decompiled.py.
  4. A prompt will appear asking for the output directory. By default, it will suggest a folder named <binary_name>_decompiled next to your input binary.
  5. Confirm the output directory.
  6. Wait for the script to finish batch decompilation. You can check the progress in IDA's Output window.

Configuration

You can tweak a few settings directly at the top of the ida_export_all_decompiled.py file:

  • INCLUDE_LIBRARY_FUNCTIONS = False
    • False: Skips functions marked as library functions by IDA.
    • True: Exports all recognized functions, including library and thunk functions.
  • SILENT_MODE = False
    • False: Allows IDA to show normal Hex-Rays progress and messages.
    • True: Minimizes batch decompiler messages for a cleaner output window.

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages