IDA 7.2 users, who have experience with IDAPython and/or the decompiler.
As you may already know, the decompilers allow not only decompiling the current function (shortcut
) but also all the functions in the database (shortcut
A somewhat less-well known feature of the “multiple” decompilation, is that if a range is selected (for example in the
), only functions within that range will be decompiled.
Alas this is not good enough for the use-case of one of users, who would like to be able to select entries in the list provided by the
, and decompile those (the biggest difference with the “
range” approach, is that there can be gaps in the selection — functions that the user doesn’t want to spend time decompiling.)
Although IDA doesn’t provide a built-in solution for this particular use-case (it cannot cover them all), we can use IDA’s scriptability to come up with the following IDAPython script, which should offer a very satisfying implementation of the idea described above:
def activate(self, ctx):
out_path = ida_kernwin.ask_file(
"Please specify the output file name");
eas = 
for pfn_idx in ctx.chooser_selection:
pfn = ida_funcs.getn_func(pfn_idx)
ida_hexrays.decompile_many(out_path, eas, 0)
def update(self, ctx):
if ctx.widget_type == ida_kernwin.BWN_FUNCS:
ACTION_NAME = "decompile-selected"
def finish_populating_widget_popup(self, w, popup):
if ida_kernwin.get_widget_type(w) == ida_kernwin.BWN_FUNCS:
hooks = popup_hooks_t()