# smu1zel/winpopbit architecture

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

- Interactive diagram: https://gitdiagram.com/smu1zel/winpopbit
- Repository: https://github.com/smu1zel/winpopbit

## Overview

WinPOPBit patches Windows installation media or individual PE binaries so Windows can boot on unsupported hardware. The main workflow is CLI-driven: build mode prepares patched installation media, while standalone mode dispatches a selected patcher; the XML profile also describes binary actions and BCD commands. Distinct patching stages cover SSE4.2 requirements and NX-related kernel, loader, and HAL changes. The excerpts show patcher registration and several implementation details, but omit much of the ISO/WIM orchestration, so uncertain internal links are left out.

Main entry points: [`src/patchers/__init__.py`](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/__init__.py) (Patcher Registry), [`src/patchers/pe.py`](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/pe.py) (PE Checksums), [`src/iso.py`](https://github.com/smu1zel/winpopbit/blob/master/src/iso.py) (ISO Builder), [`src/wim.py`](https://github.com/smu1zel/winpopbit/blob/master/src/wim.py) (WIM Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Entry"]
  node_cli["CLI<br/>[winpopbit.py]"]
end

subgraph group_media["Installation Media"]
  node_iso["ISO Builder<br/>[iso.py]"]
  node_wim["WIM Manager<br/>[wim.py]"]
end

subgraph group_patches["Binary Patching"]
  node_registry["Patcher Registry<br/>[__init__.py]"]
  node_sse["SSE4.2 Kernel<br/>[kernel_sse42.py]"]
  node_kernelnx["Kernel NX<br/>[kernel_nx.py]"]
  node_loader["Boot Loader<br/>[winload.py]"]
  node_loadernx["Loader NX<br/>[winload_nx.py]"]
  node_hal["HAL NX<br/>[hal_nx.py]"]
  node_provtool["Provisioning Tool<br/>[provtool.py]"]
end

subgraph group_support["Configuration and Support"]
  node_profile["Blob Profile<br/>[database.py]"]
  node_xml["Blob and BCD XML<br/>[badblobs.xml]"]
  node_pe["PE Checksums<br/>[pe.py]"]
  node_utils["Windows Utilities<br/>[utils.py]"]
end

node_user(("Operator"))
node_os_tools["Windows Media Tools"]
node_blobs["Replacement Blobs<br/>[README.txt]"]

node_user -->|"invokes"| node_cli
node_cli -->|"builds media"| node_iso
node_cli -->|"dispatches patch"| node_registry
node_xml -->|"configures"| node_profile
node_iso -->|"runs media commands"| node_os_tools
node_registry -->|"registers"| node_sse
node_registry -->|"registers"| node_kernelnx
node_registry -->|"registers"| node_loader
node_registry -->|"registers"| node_loadernx
node_registry -->|"registers"| node_hal
node_registry -->|"registers"| node_provtool
node_sse -->|"fixes checksum"| node_pe
node_kernelnx -->|"fixes checksum"| node_pe
node_loader -->|"fixes checksum"| node_pe
node_loadernx -->|"fixes checksum"| node_pe
node_hal -->|"fixes checksum"| node_pe
node_wim -->|"uses file helpers"| node_utils
node_iso -->|"uses file helpers"| node_utils
node_profile -.->|"checks patchers"| node_registry
node_wim -.->|"uses blob profile"| node_profile
node_wim -.->|"dispatches patches"| node_registry
node_iso -.->|"processes images"| node_wim
node_profile -.->|"selects replacements"| node_blobs

click node_cli "https://github.com/smu1zel/winpopbit/blob/master/winpopbit.py"
click node_iso "https://github.com/smu1zel/winpopbit/blob/master/src/iso.py"
click node_wim "https://github.com/smu1zel/winpopbit/blob/master/src/wim.py"
click node_profile "https://github.com/smu1zel/winpopbit/blob/master/src/database.py"
click node_xml "https://github.com/smu1zel/winpopbit/blob/master/badblobs.xml"
click node_registry "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/__init__.py"
click node_sse "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/kernel_sse42.py"
click node_kernelnx "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/kernel_nx.py"
click node_loader "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/winload.py"
click node_loadernx "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/winload_nx.py"
click node_hal "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/hal_nx.py"
click node_provtool "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/provtool.py"
click node_pe "https://github.com/smu1zel/winpopbit/blob/master/src/patchers/pe.py"
click node_utils "https://github.com/smu1zel/winpopbit/blob/master/src/utils.py"
click node_blobs "https://github.com/smu1zel/winpopbit/blob/master/blobs/README.txt"

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 toneBlue
class node_iso,node_wim toneAmber
class node_registry,node_sse,node_kernelnx,node_loader,node_loadernx,node_hal,node_provtool toneMint
class node_profile,node_xml,node_pe,node_utils toneRose
class node_user,node_os_tools toneIndigo
class node_blobs toneTeal
```

## Components

### User Entry

- [CLI](https://github.com/smu1zel/winpopbit/blob/master/winpopbit.py): `winpopbit.py`

### Installation Media

- [ISO Builder](https://github.com/smu1zel/winpopbit/blob/master/src/iso.py): `src/iso.py`
- [WIM Manager](https://github.com/smu1zel/winpopbit/blob/master/src/wim.py): `src/wim.py`

### Binary Patching

- [Patcher Registry](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/__init__.py): `src/patchers/__init__.py`
- [SSE4.2 Kernel](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/kernel_sse42.py): `src/patchers/kernel_sse42.py`
- [Kernel NX](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/kernel_nx.py): `src/patchers/kernel_nx.py`
- [Boot Loader](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/winload.py): `src/patchers/winload.py`
- [Loader NX](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/winload_nx.py): `src/patchers/winload_nx.py`
- [HAL NX](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/hal_nx.py): `src/patchers/hal_nx.py`
- [Provisioning Tool](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/provtool.py): `src/patchers/provtool.py`

### Configuration and Support

- [Blob Profile](https://github.com/smu1zel/winpopbit/blob/master/src/database.py): `src/database.py`
- [Blob and BCD XML](https://github.com/smu1zel/winpopbit/blob/master/badblobs.xml): `badblobs.xml`
- [PE Checksums](https://github.com/smu1zel/winpopbit/blob/master/src/patchers/pe.py): `src/patchers/pe.py`
- [Windows Utilities](https://github.com/smu1zel/winpopbit/blob/master/src/utils.py): `src/utils.py`

### Other components

- **Operator**
- **Windows Media Tools**
- [Replacement Blobs](https://github.com/smu1zel/winpopbit/blob/master/blobs/README.txt): `blobs/README.txt`

## Connections

- Operator → CLI: invokes (evidence: `README.md`)
- CLI → ISO Builder: builds media (evidence: `README.md`)
- CLI → Patcher Registry: dispatches patch (evidence: `winpopbit.py`)
- Blob and BCD XML → Blob Profile: configures (evidence: `README.md`)
- ISO Builder → Windows Media Tools: runs media commands (evidence: `src/iso.py`)
- Patcher Registry → SSE4.2 Kernel: registers (evidence: `src/patchers/__init__.py`)
- Patcher Registry → Kernel NX: registers (evidence: `src/patchers/__init__.py`)
- Patcher Registry → Boot Loader: registers (evidence: `src/patchers/__init__.py`)
- Patcher Registry → Loader NX: registers (evidence: `src/patchers/__init__.py`)
- Patcher Registry → HAL NX: registers (evidence: `src/patchers/__init__.py`)
- Patcher Registry → Provisioning Tool: registers (evidence: `src/patchers/__init__.py`)
- SSE4.2 Kernel → PE Checksums: fixes checksum (evidence: `src/patchers/kernel_sse42.py`)
- Kernel NX → PE Checksums: fixes checksum (evidence: `src/patchers/kernel_nx.py`)
- Boot Loader → PE Checksums: fixes checksum (evidence: `src/patchers/winload.py`)
- Loader NX → PE Checksums: fixes checksum (evidence: `src/patchers/winload_nx.py`)
- HAL NX → PE Checksums: fixes checksum (evidence: `src/patchers/hal_nx.py`)
- WIM Manager → Windows Utilities: uses file helpers (evidence: `src/wim.py`)
- ISO Builder → Windows Utilities: uses file helpers (evidence: `src/iso.py`)
- Blob Profile → Patcher Registry: checks patchers (evidence: `src/database.py`)
- WIM Manager → Blob Profile: uses blob profile (evidence: `src/wim.py`)
- WIM Manager → Patcher Registry: dispatches patches (evidence: `src/wim.py`)
- ISO Builder → WIM Manager: processes images (evidence: `src/iso.py`)
- Blob Profile → Replacement Blobs: selects replacements
