# ducki67/archetype architecture

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

- Interactive diagram: https://gitdiagram.com/ducki67/archetype
- Repository: https://github.com/ducki67/archetype

## Overview

Archetype is a Windows DLL intended to bypass Byfron/Hyperion protections in specified Fortnite builds. Its documented workflow is to select a supported version (or experimental auto-detection), load the DLL into the target process, identify that executable’s version configuration, and replace its import-address-table entries; DLL initialization also installs exception handling intended to recover from selected faults. The sampled source shows these responsibilities in a small runtime. The large version table is only partially excerpted, so its full contents and exact build coverage are not independently verified here.

Main entry points: [`Archetype/dllmain.cpp`](https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp) (DLL initialization), [`Archetype/pch.h`](https://github.com/ducki67/archetype/blob/main/Archetype/pch.h) (Version selection), [`Archetype/iat_entries.h`](https://github.com/ducki67/archetype/blob/main/Archetype/iat_entries.h) (Version import maps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_selection["Version selection"]
  node_config["Version selection<br/>[pch.h]"]
  node_versions["Version import maps<br/>[iat_entries.h]"]
end

subgraph group_runtime["DLL runtime"]
  node_attach["DLL initialization<br/>[dllmain.cpp]"]
  node_patch["IAT patching<br/>[dllmain.cpp]"]
end

subgraph group_recovery["Fault recovery"]
  node_handler["Exception recovery<br/>[dllmain.cpp]"]
end

node_target(("Fortnite process"))
node_windows["Windows APIs"]

node_target -->|"loads DLL"| node_attach
node_attach -->|"uses selection"| node_config
node_attach -->|"selects map"| node_versions
node_attach -->|"patches imports"| node_patch
node_attach -->|"registers handler"| node_handler
node_patch -->|"resolves imports"| node_windows
node_handler -->|"allocates memory"| node_windows

click node_config "https://github.com/ducki67/archetype/blob/main/Archetype/pch.h"
click node_versions "https://github.com/ducki67/archetype/blob/main/Archetype/iat_entries.h"
click node_attach "https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp"
click node_patch "https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp"
click node_handler "https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp"

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_config,node_versions toneBlue
class node_attach,node_patch toneAmber
class node_handler,node_windows toneMint
class node_target toneIndigo
```

## Components

### Version selection

- [Version selection](https://github.com/ducki67/archetype/blob/main/Archetype/pch.h): `Archetype/pch.h`
- [Version import maps](https://github.com/ducki67/archetype/blob/main/Archetype/iat_entries.h): `Archetype/iat_entries.h`

### DLL runtime

- [DLL initialization](https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp): `Archetype/dllmain.cpp`
- [IAT patching](https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp): `Archetype/dllmain.cpp`

### Fault recovery

- [Exception recovery](https://github.com/ducki67/archetype/blob/main/Archetype/dllmain.cpp): `Archetype/dllmain.cpp`

### Other components

- **Fortnite process**
- **Windows APIs**

## Connections

- Fortnite process → DLL initialization: loads DLL (evidence: `README.md`)
- DLL initialization → Version selection: uses selection (evidence: `Archetype/dllmain.cpp`)
- DLL initialization → Version import maps: selects map (evidence: `Archetype/dllmain.cpp`)
- DLL initialization → IAT patching: patches imports (evidence: `Archetype/dllmain.cpp`)
- DLL initialization → Exception recovery: registers handler (evidence: `Archetype/dllmain.cpp`)
- IAT patching → Windows APIs: resolves imports (evidence: `Archetype/dllmain.cpp`)
- Exception recovery → Windows APIs: allocates memory (evidence: `Archetype/dllmain.cpp`)
