Replies: 3 comments
-
Also, this |
Beta Was this translation helpful? Give feedback.
-
I returned to this again, but now with another question: How can I override pcode to properly display conditional branching? None of the flow overrides allow me to specify targets and conditions and I can't find a simple way to patch pcode without forking Ghidra and modifying the compiler spec. For the last screenshot, something like this should work instead of return:
|
Beta Was this translation helpful? Give feedback.
-
I think the main problem is that the decompiler can't recognize that after all these manipulations with the stack, the value at
and because of this, it struggles to recognize even simple jump with one target |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to improve the decompilation of an Arxan-obfuscated function that was split into 3 by replacing
if else
with jump to other functions.Initial Decompilation:

This function conditionally jumps to one of two other functions:
Attempts:
CALL_RETURN
Flow Override: Slightly improved output but still split into 3 functions.Marking Target Functions as Inline: Failed, likely due to the indirect call.
Adding References +
SwitchOverride.java
Script: This was the most successful with resulting C-like code:Desired Outcome:
While the
switch
is functionally correct, a more natural decompilation would be:Are there other techniques or settings to achieve decompilation with
if/else
, or to simplify the script-generatedswitch
into anif/else
?Beta Was this translation helpful? Give feedback.
All reactions