# rsefch123/ediskfreeze architecture

> Architecture diagram of the GitHub repository rsefch123/ediskfreeze, 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/rsefch123/ediskfreeze
- Repository: https://github.com/rsefch123/ediskfreeze

## Overview

EDiskFreeze is Windows kernel-level reboot-to-restore software: it protects the physical disk containing Windows and returns it to a configured baseline after restart. The main user workflow is to use the console to manage protection through the driver's IRP interface; the initializer separately discovers the system disk, prepares a differential partition, and writes its location to the registry. The driver’s disk-hook and IRP-helper modules are distinct internal layers. README statements support the console-to-driver relationship; the service’s detailed role and unsampled driver internals are not established by the excerpts.

Main entry points: [`Init/EDiskFreeze_Cppinit.cpp`](https://github.com/rsefch123/ediskfreeze/blob/main/Init/EDiskFreeze_Cppinit.cpp) (Disk initializer), [`Drivers/hello.cpp`](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/hello.cpp) (Kernel driver), [`UserModeService/EDiskFreezeU.e`](https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeU.e) (Management console), [`Drivers/h/diskhook.cpp`](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/diskhook.cpp) (IRP interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Disk setup"]
  node_initializer["Disk initializer"]
  node_registry[("Driver parameters")]
end

subgraph group_control["User control"]
  node_console["Management console<br/>[EDiskFreezeU.e]"]
  node_service["User-mode service<br/>[EDiskFreezeS.e]"]
  node_protection_ui["Protection UI"]
end

subgraph group_kernel["Kernel protection"]
  node_driver["Kernel driver<br/>[hello.cpp]"]
  node_irp_dispatch["IRP interface<br/>[diskhook.cpp]"]
  node_disk_hooks["Disk hooks<br/>[diskhook.cpp]"]
  node_irp_helpers["IRP file helpers<br/>[IrpFile.cpp]"]
end

node_operator(("Administrator"))
node_diskpart["Windows DiskPart"]
node_physical_disk[("System physical disk")]

node_operator -->|"runs setup"| node_initializer
node_initializer -->|"prepares partition"| node_diskpart
node_initializer -->|"writes parameters"| node_registry
node_operator -->|"manages protection"| node_console
node_console -->|"sends IRPs"| node_irp_dispatch
node_irp_dispatch -.->|"dispatches requests"| node_driver
node_driver -.->|"handles disk I/O"| node_disk_hooks
node_driver -.->|"uses IRP helpers"| node_irp_helpers
node_disk_hooks -.->|"redirects writes"| node_physical_disk

click node_initializer "https://github.com/rsefch123/ediskfreeze/blob/main/Init/EDiskFreeze_Cppinit.cpp"
click node_console "https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeU.e"
click node_service "https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeS.e"
click node_protection_ui "https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeSSM_Protect.e"
click node_driver "https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/hello.cpp"
click node_irp_dispatch "https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/diskhook.cpp"
click node_disk_hooks "https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/diskhook.cpp"
click node_irp_helpers "https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/IrpFile.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_initializer,node_registry toneBlue
class node_console,node_service,node_protection_ui,node_physical_disk toneAmber
class node_driver,node_irp_dispatch,node_disk_hooks,node_irp_helpers toneMint
class node_operator,node_diskpart toneIndigo
```

## Components

### Disk setup

- [Disk initializer](https://github.com/rsefch123/ediskfreeze/blob/main/Init/EDiskFreeze_Cppinit.cpp): `Init/EDiskFreeze_Cppinit.cpp`
- **Driver parameters**

### User control

- [Management console](https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeU.e): `UserModeService/EDiskFreezeU.e`
- [User-mode service](https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeS.e): `UserModeService/EDiskFreezeS.e`
- [Protection UI](https://github.com/rsefch123/ediskfreeze/blob/main/UserModeService/EDiskFreezeSSM_Protect.e): `UserModeService/EDiskFreezeSSM_Protect.e`

### Kernel protection

- [Kernel driver](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/hello.cpp): `Drivers/hello.cpp`
- [IRP interface](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/diskhook.cpp): `Drivers/h/diskhook.cpp`
- [Disk hooks](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/diskhook.cpp): `Drivers/h/diskhook.cpp`
- [IRP file helpers](https://github.com/rsefch123/ediskfreeze/blob/main/Drivers/h/IrpFile.cpp): `Drivers/h/IrpFile.cpp`

### Other components

- **Administrator**
- **Windows DiskPart**
- **System physical disk**

## Connections

- Administrator → Disk initializer: runs setup (evidence: `README.md`)
- Disk initializer → Windows DiskPart: prepares partition (evidence: `Init/EDiskFreeze_Cppinit.cpp`)
- Disk initializer → Driver parameters: writes parameters (evidence: `Init/EDiskFreeze_Cppinit.cpp`)
- Administrator → Management console: manages protection (evidence: `README.md`)
- Management console → IRP interface: sends IRPs (evidence: `README.md`)
- IRP interface → Kernel driver: dispatches requests
- Kernel driver → Disk hooks: handles disk I/O
- Kernel driver → IRP file helpers: uses IRP helpers
- Disk hooks → System physical disk: redirects writes
