# jeongjy0317/ghidra-paradise architecture

> Architecture diagram of the GitHub repository jeongjy0317/ghidra-paradise, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeongjy0317/ghidra-paradise
- Repository: https://github.com/jeongjy0317/ghidra-paradise

## Overview

1. **Project shape**
   - This is a **Ghidra extension** written in **Java** and built with **Gradle/Ghidra’s extension build system**.
   - The repo is centered around a single plugin package, `paradise`, which adds UI surfaces and analysis helpers on top of Ghidra’s decompiler and program model.

2. **Top-level integration boundary**
   - `ParadisePlugin` is the main entry point into Ghidra.
   - It wires menu actions, hotkeys, settings, exports, and opens the different dockable providers.
   - The plugin is the boundary between **Ghidra’s Program/Decompiler APIs** and the Paradise-specific UI/analysis layer.

3. **Decompiler/pseudocode subsystem**
   - `ParadiseDecompilerProvider` owns the main pseudocode experience: the decompiled text view, tabs for xrefs/locals/trace/calls/strings/diff/drafts/suggestions/triage/cleanups, and navigation behavior.
   - `ParadiseDecompilerEngine` wraps Ghidra’s decompilation interface and applies the “Clean C” display/export transformation pass.
   - This subsystem consumes decompiler output and produces a more review-friendly C-like presentation, but does not mutate Ghidra’s database unless the user explicitly performs an edit action.

4. **Clean-up and display transformation flow**
   - The engine is responsible for deterministic cleanup rules such as type aliasing, wrapper cleanup, stack-canary simplification, cast/literal simplification, and other readability passes.
   - The same cleanup path is used for both on-screen pseudocode and export output, so the view and exported code stay consistent.
   - `ParadiseDecompileResult` likely carries the decompiler text plus cleanup metadata used by the UI and the Cleanups tab.

5. **Diagram/graph subsystem**
   - `ParadiseGraphProvider` implements the IDA-like control-flow diagram experience.
   - It is a separate dockable surface for function or binary diagrams, including block/edge annotations and export.
   - This subsystem sits beside the decompiler view rather than replacing it; both are alternative renderings of the same underlying program/function data.

6. **Inspector / finding scan subsystem**
   - `ParadiseFindProvider` is the dockable “Inspector” window for URL/path/registry/shell/executable-launch review.
   - `ParadiseFindScanner` performs the actual scan over a function or whole binary, including decoded-string matching.
   - The scanner outputs structured rows such as `ParadiseXrefRow`, and the provider renders overview/detail tabs, filters, merge/count behavior, and navigation back to the source location.

7. **Encoding and string analysis helpers**
   - `ParadiseDecodeUtil` handles decoding workflows for things like Base64, hex, URL percent encoding, Base32, UTF-16LE, and UTF-16BE.
   - `ParadiseStringUtil` supports string discovery/rendering and is used by the pseudocode string tabs and Inspector paths.
   - `ParadiseTokenSpan` and related helpers support mapping text ranges/tokens back to source positions for highlighting, search, and navigation.

8. **Cross-reference and navigation model**
   - `ParadiseXrefRow` represents xref table rows used in the pseudocode analysis tabs and navigation UI.
   - The architecture emphasizes jumping between three coordinate systems: **listing address**, **decompiler token/line**, and **derived analysis row**.
   - This is how features like “Goto usage,” “Follow token,” and synchronized selection work across views.

9. **UI and state model**
   - The extension is heavily UI-driven: dockable providers, tabbed analysis panels, context menus, local toolbar buttons, and settings pages.
   - `ParadisePluginPackage` groups the plugin for Ghidra’s extension packaging and module metadata.
   - Settings control what tabs are visible, how cleanup behaves, how Inspector rows are merged/rendered, and how navigation hotkeys and layout behave.

10. **Core data flow**
   - Source program data starts in Ghidra’s current `Program` and `Function`.
   - The plugin triggers decompilation, which flows through the engine into pseudocode/diagram providers.
   - String and token data are then analyzed by the decode and find subsystems, producing structured findings that are rendered in separate analysis tabs and the Inspector window.
   - Navigation loops back into Ghidra’s listing/decompiler through address and token selection.

11. **Mutability boundary**
   - A key design constraint is that Paradise is primarily a **read/inspect/review layer**.
   - Cleanup transforms, decoded views, and exported code are display/export-oriented.
   - Actual Ghidra database mutations are kept behind explicit user actions like rename, type change, or comment actions.

12. **Packaging/runtime**
   - The extension targets **Ghidra 12.1** and a JDK compatible with that Ghidra installation.
   - Build output is a Ghidra extension ZIP, installed through Ghidra’s extension manager.
   - There are no separate backend services or external runtime components; everything runs inside the Ghidra desktop application process.

Main entry points: [`src/main/java/paradise/ParadisePlugin.java`](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadisePlugin.java) (ParadisePlugin), [`src/main/java/paradise/ParadiseDecompilerProvider.java`](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerProvider.java) (Decompiler view), [`src/main/java/paradise/ParadiseFindScanner.java`](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseFindScanner.java) (Find scanner), [`src/main/java/paradise/ParadiseDecompilerEngine.java`](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerEngine.java) (Clean engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Ghidra boundary"]
  node_paradise_plugin["ParadisePlugin<br/>plugin entry"]
  node_paradise_package["Plugin package<br/>package metadata"]
end

subgraph group_ui["UI surfaces"]
  node_decompiler_provider["Decompiler view<br/>dockable UI"]
  node_graph_provider["Graph view<br/>diagram UI"]
  node_find_provider["Inspector<br/>review UI"]
end

subgraph group_core["Analysis core"]
  node_decompiler_engine["Clean engine<br/>decompile transform"]
  node_decompile_result["Decompile result<br/>result model"]
  node_find_scanner["Find scanner<br/>scan engine"]
  node_decode_util["Decode util<br/>decoder helpers"]
  node_string_util["String util<br/>string helpers"]
  node_token_span["Token span<br/>span model"]
  node_xref_row["Xref row<br/>row model"]
end

subgraph group_packaging["Build"]
  node_ghidra_build["Gradle build<br/>extension build<br/>[build.gradle]"]
end

node_paradise_plugin -->|"opens"| node_decompiler_provider
node_paradise_plugin -->|"opens"| node_graph_provider
node_paradise_plugin -->|"opens"| node_find_provider
node_paradise_plugin -->|"wires"| node_decompiler_engine
node_paradise_plugin -->|"registers"| node_paradise_package
node_decompiler_provider -->|"requests"| node_decompiler_engine
node_decompiler_engine -->|"produces"| node_decompile_result
node_decompiler_provider -->|"highlights"| node_token_span
node_decompiler_provider -->|"shows"| node_xref_row
node_find_provider -->|"runs"| node_find_scanner
node_find_scanner -->|"decodes"| node_decode_util
node_find_scanner -->|"matches"| node_string_util
node_find_scanner -->|"emits"| node_xref_row
node_graph_provider -->|"shares data"| node_decompiler_engine
node_graph_provider -->|"navigates"| node_token_span
node_ghidra_build -->|"packages"| node_paradise_plugin

click node_paradise_plugin "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadisePlugin.java"
click node_paradise_package "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadisePluginPackage.java"
click node_decompiler_provider "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerProvider.java"
click node_graph_provider "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseGraphProvider.java"
click node_find_provider "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseFindProvider.java"
click node_decompiler_engine "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerEngine.java"
click node_decompile_result "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompileResult.java"
click node_find_scanner "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseFindScanner.java"
click node_decode_util "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecodeUtil.java"
click node_string_util "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseStringUtil.java"
click node_token_span "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseTokenSpan.java"
click node_xref_row "https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseXrefRow.java"
click node_ghidra_build "https://github.com/jeongjy0317/ghidra-paradise/blob/main/build.gradle"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_paradise_plugin,node_paradise_package toneBlue
class node_decompiler_provider,node_graph_provider,node_find_provider toneAmber
class node_decompiler_engine,node_decompile_result,node_find_scanner,node_decode_util,node_string_util,node_token_span,node_xref_row toneMint
class node_ghidra_build toneRose
```

## Components

### Ghidra boundary

Plugin entry point and extension packaging that connect Paradise into Ghidra.

- [ParadisePlugin](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadisePlugin.java): plugin entry · Main Ghidra plugin entry point. Wires actions, hotkeys, settings, exports, and opens the major Paradise views. · `src/main/java/paradise/ParadisePlugin.java`
- [Plugin package](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadisePluginPackage.java): package metadata · Ghidra plugin package metadata and registration hook for the extension. · `src/main/java/paradise/ParadisePluginPackage.java`

### UI surfaces

Dockable providers and interactive review panels.

- [Decompiler view](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerProvider.java): dockable UI · Primary pseudocode surface with tabs for xrefs, locals, trace, calls, strings, diffs, drafts, suggestions, triage, and cleanups. · `src/main/java/paradise/ParadiseDecompilerProvider.java`
- [Graph view](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseGraphProvider.java): diagram UI · IDA-like control-flow diagram surface for function and binary review, with annotations and export. · `src/main/java/paradise/ParadiseGraphProvider.java`
- [Inspector](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseFindProvider.java): review UI · Dockable finding browser for URLs, paths, registry, shell, and executable-launch review. · `src/main/java/paradise/ParadiseFindProvider.java`

### Analysis core

Decompiler cleanup, scanning, decoding, and shared analysis models.

- [Clean engine](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompilerEngine.java): decompile transform · Wraps Ghidra decompilation and applies deterministic Clean C display/export transformations. · `src/main/java/paradise/ParadiseDecompilerEngine.java`
- [Decompile result](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecompileResult.java): result model · Carries decompiler text and cleanup metadata shared by the pseudocode UI and export paths. · `src/main/java/paradise/ParadiseDecompileResult.java`
- [Find scanner](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseFindScanner.java): scan engine · Scans a function or whole binary for review targets, including decoded-string matching. · `src/main/java/paradise/ParadiseFindScanner.java`
- [Decode util](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseDecodeUtil.java): decoder helpers · Decoding workflows such as Base64, hex, URL percent encoding, Base32, and UTF-16 variants. · `src/main/java/paradise/ParadiseDecodeUtil.java`
- [String util](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseStringUtil.java): string helpers · String discovery and rendering helpers used by pseudocode string tabs and inspection paths. · `src/main/java/paradise/ParadiseStringUtil.java`
- [Token span](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseTokenSpan.java): span model · Maps text ranges and tokens back to source positions for highlighting and navigation. · `src/main/java/paradise/ParadiseTokenSpan.java`
- [Xref row](https://github.com/jeongjy0317/ghidra-paradise/blob/main/src/main/java/paradise/ParadiseXrefRow.java): row model · Structured cross-reference row used by analysis tabs and navigation views. · `src/main/java/paradise/ParadiseXrefRow.java`

### Build

Gradle-based extension build and module metadata.

- [Gradle build](https://github.com/jeongjy0317/ghidra-paradise/blob/main/build.gradle): extension build · Gradle and Ghidra extension build configuration for producing the installable ZIP. · `build.gradle`

## Connections

- ParadisePlugin → Decompiler view: opens · Plugin creates and coordinates the main pseudocode surface.
- ParadisePlugin → Graph view: opens · Plugin exposes the diagram surface as an alternative rendering.
- ParadisePlugin → Inspector: opens · Plugin exposes the Inspector window for review workflows.
- ParadisePlugin → Clean engine: wires · Plugin routes program/function context into the decompilation pipeline.
- ParadisePlugin → Plugin package: registers · Package metadata makes the extension visible to Ghidra.
- Decompiler view → Clean engine: requests · Decompiler UI asks the engine for cleaned pseudocode output.
- Clean engine → Decompile result: produces · Engine returns cleaned text plus metadata for display and export.
- Decompiler view → Token span: highlights · UI uses token spans to sync selection, search, and navigation.
- Decompiler view → Xref row: shows · Decompiler tabs render cross-reference and analysis rows.
- Inspector → Find scanner: runs · Inspector delegates function or binary scans to the scanner.
- Find scanner → Decode util: decodes · Scanner uses decoding workflows to resolve encoded indicators.
- Find scanner → String util: matches · Scanner reuses string discovery and rendering helpers.
- Find scanner → Xref row: emits · Scanner outputs structured findings as cross-reference rows.
- Graph view → Clean engine: shares data · Diagram view consumes the same underlying program/function context as decompilation.
- Graph view → Token span: navigates · Graph interactions synchronize with source positions where applicable.
- Gradle build → ParadisePlugin: packages · Build output assembles the plugin and its runtime classes into a Ghidra extension.
