Skip to main content
The Pseudocode View displays decompiled C-like code generated from binary assembly, making it easier to understand program logic and structure.

Overview

angr Management’s decompiler transforms assembly code into readable pseudocode:

From This

push rbp
mov rbp, rsp
sub rsp, 0x10
mov [rbp-4], edi

To This

int main(int argc) {
    int local_4 = argc;
    ...

Opening the Pseudocode View

  • Press Tab while in disassembly view
  • View → Pseudocode
  • Right-click function → “Decompile”

Within Pseudocode

1

Scroll

Use mouse wheel or arrow keys to navigate
2

Jump to Function

Double-click on function calls to decompile that function
3

Jump to Address

Double-click on constants that represent addresses
4

Jump to Variable

Double-click on memory-backed variables to jump to their address
The pseudocode view maintains its own navigation history:
  • Back: Press Esc or use the back button
  • Forward: Use the forward button
  • History dropdown: Click the dropdown to see recent functions

Switching to Disassembly

Press Tab to switch back to disassembly at the current instruction.

Syntax Highlighting

Code elements are color-coded for readability:
ElementDefault ColorExample
KeywordsBlueif, while, return
FunctionsBluesub_401000()
Library FunctionsMagentaprintf()
TypesBlueint, char*
VariablesBlacklocal_var_4
Global VariablesBlueglobal_data
CommentsGreen// comment
StringsGreen"hello"
LabelsBluelabel_1:
Colors are customizable in File → Preferences → Theme.

Code Navigation Features

Cursor Highlighting

When you click on a code element:
  • All references to that element are highlighted
  • Variable uses are shown with yellow background
  • Function calls show all occurrences
  • Constants highlight identical values

Selection Synchronization

Clicking on code in pseudocode:
  1. Highlights the corresponding assembly instruction
  2. Updates synchronized views
  3. Shows the instruction address in the status bar

Editing and Annotations

Renaming Variables

1

Select Variable

Click on any variable reference
2

Open Rename Dialog

Press N or right-click → “Rename”
3

Enter New Name

Type the new variable name
4

Apply

Press Enter - all references update immediately

Renaming Functions

Same process as variables:
  1. Click on function name
  2. Press N or right-click → “Rename”
  3. Enter new name
  4. All call sites update

Retyping Variables

Change variable types for better decompilation:
  1. Right-click on variable
  2. Select “Retype Variable”
  3. Enter C type (e.g., char*, struct my_struct*)
  4. Decompiler regenerates with new type information
Retyping variables triggers automatic redecompilation to propagate type changes.

Comments

Add comments to pseudocode:
  1. Right-click on a line
  2. Select “Add Comment”
  3. Type your comment
  4. Comments persist across sessions

Decompilation Options

Customize decompilation behavior via the options panel:
Show/Hide Options:
  • Decompilation Options panel
  • Toggle with the options button
Available Settings:
  • Variable recovery mode
  • Optimization passes
  • Display preferences

Optimization Passes

Select which optimization passes to apply:
  • Dead code elimination
  • Expression simplification
  • Copy propagation
  • Constant folding
  • Loop structuring
  • Switch statement recovery
  • Structure recovery
  • Goto elimination
Disabling optimization passes may result in more verbose but more accurate code.

Redecompiling

Force redecompilation with different settings:
  1. Modify options in the options panel
  2. Options panel shows “dirty” indicator
  3. Redecompilation occurs automatically
  4. Or manually trigger via Analyze → Decompile

Multiple Decompilation Flavors

angr can produce different decompilation outputs:
Standard C-like output
  • Structured control flow
  • Variable names and types
  • Optimized for readability
Default flavor, best for most analysis.
Switch between flavors:
  • Press Space to cycle through available flavors
  • Or use the flavor dropdown in the status bar

AI-Assisted Decompilation

angr Management can use Large Language Models to improve decompilation:
AI features require configuring an LLM client in File → Preferences → LLM.

Available AI Features

Suggest Variable Names

AI analyzes context and suggests meaningful variable names

Suggest Function Names

AI infers function purpose and suggests descriptive names

Suggest Variable Types

AI infers variable types from usage patterns

Summarize Function

AI generates natural language description of function behavior

Using AI Features

Manual Refinement:
  1. Navigate to AI menu
  2. Select desired refinement:
    • LLM Suggest Variable Names
    • LLM Suggest Function Name
    • LLM Suggest Variable Types
    • LLM Summarize Function
    • LLM Refine All (runs all improvements)
  3. Wait for AI processing
  4. Review and accept/reject suggestions
Automatic Refinement: Enable in Preferences → LLM:
  • Auto-rename variables
  • Auto-rename functions
  • Auto-retype variables
  • Auto-summarize functions
Automatic AI refinement runs on every decompilation and may slow down the process.

Function Summaries

When AI summarization is enabled:
  1. Function summary appears in a panel above the code
  2. Toggle panel visibility with the summary button
  3. Summaries are cached and persist across sessions
  4. Edit summaries manually if needed

Advanced Features

Structure Recovery

angr attempts to recover structure definitions:
struct mystruct {
    int field_0;
    char* field_8;
    int field_10;
};

void func(struct mystruct* arg0) {
    arg0->field_0 = 0;
    ...
}
Improve structure recovery:
  1. Define structures in Types view
  2. Apply types to variables
  3. Retype function parameters
  4. Redecompile with updated type info

Inline Functions

Control which functions are inlined:
  1. Navigate to function in Functions view
  2. Right-click → “Inline in decompilation”
  3. Redecompile calling functions
  4. Inlined function code appears directly in caller
Inlining small utility functions can make code more readable.

Calling Convention Analysis

angr automatically determines calling conventions:
  • Detected conventions shown in function signatures
  • Manual override available in function properties
  • Custom conventions can be defined

Performance Considerations

Large Functions

Decompilation time increases with:
  • Function size
  • Number of basic blocks
  • Complexity of control flow
Tip: Consider disabling some optimization passes for faster results.

First Decompilation

Initial decompilation is slower because:
  • Variable recovery must run
  • Type analysis is performed
  • Results are cached afterward
Tip: Let the first decompilation complete for best results.

Keyboard Shortcuts

KeyAction
TabSwitch to/from disassembly
SpaceCycle decompilation flavors
GJump to address (opens in disassembly)
EscNavigate back in history
NRename variable/function

Exporting Pseudocode

Save decompiled code:
  1. Right-click in pseudocode view
  2. Select “Copy” to copy to clipboard
  3. Or select “Export” to save to file
  4. Choose format (C, HTML, etc.)

Troubleshooting

Possible causes:
  • Obfuscated code
  • Indirect jumps
  • Missing function boundaries
Solutions:
  • Run CFG analysis first
  • Define function boundaries manually
  • Try disabling optimization passes
angr uses generic names like local_4Solutions:
  • Use AI variable name suggestions
  • Manually rename important variables
  • Enable accurate variable recovery mode
Variables show as int when they should be pointersSolutions:
  • Manually retype variables
  • Use AI type suggestions
  • Define structures in Types view
  • Enable advanced type inference

Next Steps

Debugging

Debug decompiled code with breakpoints

Patching

Apply patches based on pseudocode analysis

Configuration

Customize pseudocode colors and fonts

Disassembly

Return to disassembly view guide

Build docs developers (and LLMs) love