# atrexus/vulkan architecture

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

- Interactive diagram: https://gitdiagram.com/atrexus/vulkan
- Repository: https://github.com/atrexus/vulkan

## Overview

Vulkan is a Windows command-line PE dumper that reads a selected process module, restores its in-memory image, and writes the result as a PE file. Its main workflow is CLI configuration and process opening, memory-image reconstruction (including page decryption and section handling), optional import rebuilding and rebasing, then file output. The README also documents waiting for a process and creating a minidump. The dumper implementation is only partially excerpted, so some workflow links below rely on README statements rather than inspected call sites.

Main entry points: [`src/main.cpp`](https://github.com/atrexus/vulkan/blob/main/src/main.cpp) (CLI entry), [`src/pe/image.cpp`](https://github.com/atrexus/vulkan/blob/main/src/pe/image.cpp) (PE image), [`src/dumper.cpp`](https://github.com/atrexus/vulkan/blob/main/src/dumper.cpp) (Dump workflow), [`src/pe/import_directory.cpp`](https://github.com/atrexus/vulkan/blob/main/src/pe/import_directory.cpp) (Import rebuilding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command line"]
  node_cli_entry["CLI entry<br/>[main.cpp]"]
end

subgraph group_dump["Image restoration"]
  node_dumper["Dump workflow<br/>[dumper.cpp]"]
  node_section_restore["Section restoration<br/>[dumper.cpp]"]
  node_import_resolve["Import rebuilding"]
end

subgraph group_pe["PE image model"]
  node_image["PE image<br/>[image.cpp]"]
  node_section_headers["Section headers"]
  node_image_util["PE utilities<br/>[util.hpp]"]
end

node_operator(("Operator"))
node_target["Target process"]
node_output["Dump file"]
node_minidump["Process minidump"]

node_operator -->|"configures"| node_cli_entry
node_cli_entry -->|"opens"| node_target
node_cli_entry -->|"starts dump"| node_dumper
node_dumper -->|"reads module"| node_target
node_dumper -->|"restores sections"| node_section_restore
node_section_restore -.->|"fills image"| node_image
node_dumper -->|"rebuilds imports"| node_import_resolve
node_import_resolve -->|"updates image"| node_image
node_image -->|"owns directory"| node_import_resolve
node_image -->|"uses headers"| node_section_headers
node_cli_entry -->|"saves result"| node_image
node_cli_entry -->|"writes file"| node_output
node_cli_entry -.->|"can create"| node_minidump
node_image -->|"uses alignment"| node_image_util

click node_cli_entry "https://github.com/atrexus/vulkan/blob/main/src/main.cpp"
click node_dumper "https://github.com/atrexus/vulkan/blob/main/src/dumper.cpp"
click node_section_restore "https://github.com/atrexus/vulkan/blob/main/src/dumper.cpp"
click node_import_resolve "https://github.com/atrexus/vulkan/blob/main/src/pe/import_directory.cpp"
click node_image "https://github.com/atrexus/vulkan/blob/main/src/pe/image.cpp"
click node_section_headers "https://github.com/atrexus/vulkan/blob/main/src/pe/section_headers.cpp"
click node_image_util "https://github.com/atrexus/vulkan/blob/main/include/pe/util.hpp"

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_cli_entry toneBlue
class node_dumper,node_section_restore,node_import_resolve toneAmber
class node_image,node_section_headers,node_image_util toneMint
class node_operator,node_target,node_output,node_minidump toneIndigo
```

## Components

### Command line

- [CLI entry](https://github.com/atrexus/vulkan/blob/main/src/main.cpp): `src/main.cpp`

### Image restoration

- [Dump workflow](https://github.com/atrexus/vulkan/blob/main/src/dumper.cpp): `src/dumper.cpp`
- [Section restoration](https://github.com/atrexus/vulkan/blob/main/src/dumper.cpp): `src/dumper.cpp`
- [Import rebuilding](https://github.com/atrexus/vulkan/blob/main/src/pe/import_directory.cpp): `src/pe/import_directory.cpp`

### PE image model

- [PE image](https://github.com/atrexus/vulkan/blob/main/src/pe/image.cpp): `src/pe/image.cpp`
- [Section headers](https://github.com/atrexus/vulkan/blob/main/src/pe/section_headers.cpp): `src/pe/section_headers.cpp`
- [PE utilities](https://github.com/atrexus/vulkan/blob/main/include/pe/util.hpp): `include/pe/util.hpp`

### Other components

- **Operator**
- **Target process**
- **Dump file**
- **Process minidump**

## Connections

- Operator → CLI entry: configures (evidence: `README.md`)
- CLI entry → Target process: opens (evidence: `src/main.cpp`)
- CLI entry → Dump workflow: starts dump (evidence: `src/main.cpp`)
- Dump workflow → Target process: reads module (evidence: `README.md`)
- Dump workflow → Section restoration: restores sections (evidence: `README.md`)
- Section restoration → PE image: fills image
- Dump workflow → Import rebuilding: rebuilds imports (evidence: `src/dumper.cpp`)
- Import rebuilding → PE image: updates image
- PE image → Import rebuilding: owns directory (evidence: `src/pe/image.cpp`)
- PE image → Section headers: uses headers (evidence: `src/pe/image.cpp`)
- CLI entry → PE image: saves result (evidence: `src/main.cpp`)
- CLI entry → Dump file: writes file (evidence: `src/main.cpp`)
- CLI entry → Process minidump: can create
- PE image → PE utilities: uses alignment (evidence: `src/pe/image.cpp`)
