So what’s up with pdc? Well, it’s the entrypoint for all decompilers, you can setup cmd.pdc eval variable to use any other decompiler (use “e cmd.pdc=?”) to list them all.
By default it’s using the pseudo disassembler because it’s native to r2, it’s fast, uses esil emulation and it wont lie. It’s good quality? No. Can be considered a decompiler? Once again: no.
But it works quite well and AI can understand the output very well and that was used by decai to transpile using LLMs from assembly to any language like bash, haskell or c#.
The r2ghidra plugin has been improved a lot recently. I think last release is probably the first one i would care to use, but still it’s not 1:1 with r2 analysis and doesn’t takes advantage of the esil emulation which is sometimes important when analysing malware (strings build with registers or stack, etc)
R2dec is the other option, its more verbose than r2ghidra, there are almost no optimization passes, its not leveraging esil, not the output is aligned with r2 analysis.
Which one is the best? Can’t say because in r2land there’s usually not a single correct answer. So better try them out and take your own conclussions.