# huiyadanli/revokemsgpatcher architecture

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

## Overview

RevokeMsgPatcher is a Windows desktop utility that patches WeChat, QQ, and TIM binaries to prevent message revocation; Weixin builds also expose a multi-instance option. The main workflow is to select a client and installation path, inspect target files and supported patch features, choose applicable categories, then patch or restore backed-up files. The graph separates UI, patch configuration and matching, file modification, and auxiliary tools. Some implementation details are unsampled; those relationships are omitted rather than inferred.

Main entry points: [`RevokeMsgPatcher/FormMain.cs`](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/FormMain.cs) (Main patch UI), [`RevokeMsgPatcher/Modifier/AppModifier.cs`](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/AppModifier.cs) (Patch coordinator), [`RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs`](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs) (Multi-instance UI), [`RevokeMsgPatcher/Modifier/FileHexEditor.cs`](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/FileHexEditor.cs) (Binary file editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Patch interface"]
  node_mainui["Main patch UI<br/>[FormMain.cs]"]
  node_categoryui["Category controls<br/>[UIController.cs]"]
end

subgraph group_config["Patch definitions"]
  node_bag["Patch bundle<br/>[Bag.cs]"]
  node_appmodel["Client definitions<br/>[App.cs]"]
  node_target["Target file specs<br/>[TargetInfo.cs]"]
  node_exactinfo["Exact modifications<br/>[ModifyInfo.cs]"]
  node_commoninfo["Versioned patterns"]
  node_pattern["Replace patterns<br/>[ReplacePattern.cs]"]
  node_change["Byte changes<br/>[Change.cs]"]
end

subgraph group_engine["Patch engine"]
  node_appmodifier["Patch coordinator<br/>[AppModifier.cs]"]
  node_clientmods["Client modifiers"]
  node_hexeditor["Binary file editor<br/>[FileHexEditor.cs]"]
  node_finder["Pattern finder<br/>[ModifyFinder.cs]"]
  node_fuzzy["Fuzzy matching<br/>[FuzzyMatcher.cs]"]
  node_boyermoore["Byte search"]
end

subgraph group_support["Supporting tools"]
  node_fileutil["File operations<br/>[FileUtil.cs]"]
  node_pathutil["Install discovery<br/>[PathUtil.cs]"]
  node_updates["Patch update service<br/>[HttpUtil.cs]"]
  node_analytics["Usage reporting<br/>[GAHelper.cs]"]
  node_exception["Patch errors"]
  node_assistant["Patch assistant"]
  node_multiui["Multi-instance UI"]
  node_processutil["Process utilities<br/>[ProcessUtil.cs]"]
  node_wechatprocess["WeChat process<br/>[WechatProcess.cs]"]
end

node_user(("Windows user"))

node_user -->|"selects client"| node_mainui
node_mainui -->|"loads bundle"| node_bag
node_mainui -->|"selects modifier"| node_appmodifier
node_mainui -->|"updates controls"| node_categoryui
node_mainui -->|"fetches patches"| node_updates
node_mainui -->|"reports usage"| node_analytics
node_mainui -->|"opens tool"| node_multiui
node_appmodifier -->|"creates editors"| node_hexeditor
node_appmodifier -->|"finds changes"| node_finder
node_appmodifier -->|"sets categories"| node_categoryui
node_clientmods -->|"specializes"| node_appmodifier
node_clientmods -->|"uses editor"| node_hexeditor
node_finder -->|"matches patterns"| node_fuzzy
node_fuzzy -->|"uses search"| node_boyermoore
node_hexeditor -->|"edits files"| node_fileutil
node_appmodifier -->|"reports failures"| node_exception
node_multiui -->|"manages processes"| node_processutil
node_multiui -->|"uses process model"| node_wechatprocess

click node_mainui "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/FormMain.cs"
click node_categoryui "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Forms/UIController.cs"
click node_bag "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/Bag.cs"
click node_appmodel "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/App.cs"
click node_target "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/TargetInfo.cs"
click node_exactinfo "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/ModifyInfo.cs"
click node_commoninfo "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/CommonModifyInfo.cs"
click node_pattern "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/ReplacePattern.cs"
click node_change "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/Change.cs"
click node_appmodifier "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/AppModifier.cs"
click node_clientmods "https://github.com/huiyadanli/revokemsgpatcher/tree/master/RevokeMsgPatcher/Modifier"
click node_hexeditor "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/FileHexEditor.cs"
click node_finder "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/ModifyFinder.cs"
click node_fuzzy "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs"
click node_boyermoore "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/BoyerMooreMatcher.cs"
click node_fileutil "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/FileUtil.cs"
click node_pathutil "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/PathUtil.cs"
click node_updates "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/HttpUtil.cs"
click node_analytics "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/GAHelper.cs"
click node_exception "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/BusinessException.cs"
click node_assistant "https://github.com/huiyadanli/revokemsgpatcher/tree/master/RevokeMsgPatcher.Assistant"
click node_multiui "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs"
click node_processutil "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/ProcessUtil.cs"
click node_wechatprocess "https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/WechatProcess.cs"

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_mainui,node_categoryui,node_user toneBlue
class node_bag,node_appmodel,node_target,node_exactinfo,node_commoninfo,node_pattern,node_change toneAmber
class node_appmodifier,node_clientmods,node_hexeditor,node_finder,node_fuzzy,node_boyermoore toneMint
class node_fileutil,node_pathutil,node_updates,node_analytics,node_exception,node_assistant,node_multiui,node_processutil,node_wechatprocess toneRose
```

## Components

### Patch interface

- [Main patch UI](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/FormMain.cs): `RevokeMsgPatcher/FormMain.cs`
- [Category controls](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Forms/UIController.cs): `RevokeMsgPatcher/Forms/UIController.cs`

### Patch definitions

- [Patch bundle](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/Bag.cs): `RevokeMsgPatcher/Model/Bag.cs`
- [Client definitions](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/App.cs): `RevokeMsgPatcher/Model/App.cs`
- [Target file specs](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/TargetInfo.cs): `RevokeMsgPatcher/Model/TargetInfo.cs`
- [Exact modifications](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/ModifyInfo.cs): `RevokeMsgPatcher/Model/ModifyInfo.cs`
- [Versioned patterns](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/CommonModifyInfo.cs): `RevokeMsgPatcher/Model/CommonModifyInfo.cs`
- [Replace patterns](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/ReplacePattern.cs): `RevokeMsgPatcher/Model/ReplacePattern.cs`
- [Byte changes](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Model/Change.cs): `RevokeMsgPatcher/Model/Change.cs`

### Patch engine

- [Patch coordinator](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/AppModifier.cs): `RevokeMsgPatcher/Modifier/AppModifier.cs`
- [Client modifiers](https://github.com/huiyadanli/revokemsgpatcher/tree/master/RevokeMsgPatcher/Modifier): `RevokeMsgPatcher/Modifier`
- [Binary file editor](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Modifier/FileHexEditor.cs): `RevokeMsgPatcher/Modifier/FileHexEditor.cs`
- [Pattern finder](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/ModifyFinder.cs): `RevokeMsgPatcher/Matcher/ModifyFinder.cs`
- [Fuzzy matching](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs): `RevokeMsgPatcher/Matcher/FuzzyMatcher.cs`
- [Byte search](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Matcher/BoyerMooreMatcher.cs): `RevokeMsgPatcher/Matcher/BoyerMooreMatcher.cs`

### Supporting tools

- [File operations](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/FileUtil.cs): `RevokeMsgPatcher/Utils/FileUtil.cs`
- [Install discovery](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/PathUtil.cs): `RevokeMsgPatcher/Utils/PathUtil.cs`
- [Patch update service](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/HttpUtil.cs): `RevokeMsgPatcher/Utils/HttpUtil.cs`
- [Usage reporting](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/Utils/GAHelper.cs): `RevokeMsgPatcher/Utils/GAHelper.cs`
- [Patch errors](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher/BusinessException.cs): `RevokeMsgPatcher/BusinessException.cs`
- [Patch assistant](https://github.com/huiyadanli/revokemsgpatcher/tree/master/RevokeMsgPatcher.Assistant): `RevokeMsgPatcher.Assistant`
- [Multi-instance UI](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs): `RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs`
- [Process utilities](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/ProcessUtil.cs): `RevokeMsgPatcher.MultiInstance/ProcessUtil.cs`
- [WeChat process](https://github.com/huiyadanli/revokemsgpatcher/blob/master/RevokeMsgPatcher.MultiInstance/WechatProcess.cs): `RevokeMsgPatcher.MultiInstance/WechatProcess.cs`

### Other components

- **Windows user**

## Connections

- Windows user → Main patch UI: selects client
- Main patch UI → Patch bundle: loads bundle (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Main patch UI → Patch coordinator: selects modifier (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Main patch UI → Category controls: updates controls (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Main patch UI → Patch update service: fetches patches (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Main patch UI → Usage reporting: reports usage (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Main patch UI → Multi-instance UI: opens tool (evidence: `RevokeMsgPatcher/FormMain.cs`)
- Patch coordinator → Binary file editor: creates editors (evidence: `RevokeMsgPatcher/Modifier/AppModifier.cs`)
- Patch coordinator → Pattern finder: finds changes (evidence: `RevokeMsgPatcher/Modifier/AppModifier.cs`)
- Patch coordinator → Category controls: sets categories (evidence: `RevokeMsgPatcher/Modifier/AppModifier.cs`)
- Client modifiers → Patch coordinator: specializes (evidence: `RevokeMsgPatcher/Modifier/QQNTModifier.cs`)
- Client modifiers → Binary file editor: uses editor (evidence: `RevokeMsgPatcher/Modifier/QQNTModifier.cs`)
- Pattern finder → Fuzzy matching: matches patterns (evidence: `RevokeMsgPatcher/Matcher/ModifyFinder.cs`)
- Fuzzy matching → Byte search: uses search (evidence: `RevokeMsgPatcher/Matcher/FuzzyMatcher.cs`)
- Binary file editor → File operations: edits files (evidence: `RevokeMsgPatcher/Modifier/FileHexEditor.cs`)
- Patch coordinator → Patch errors: reports failures (evidence: `RevokeMsgPatcher/Modifier/AppModifier.cs`)
- Multi-instance UI → Process utilities: manages processes (evidence: `RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs`)
- Multi-instance UI → WeChat process: uses process model (evidence: `RevokeMsgPatcher.MultiInstance/FormMultiInstance.cs`)
