From b61d774cb3bf79eb1bfffaafa077b6f53fd9d9e1 Mon Sep 17 00:00:00 2001 From: deadash Date: Wed, 25 Oct 2023 11:35:47 +0800 Subject: [PATCH] Update README.md --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aced0ba..aff8b52 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,58 @@ -## 目标 +# MakeXPStub: Make Your PE Executables XP-Compatible -读取目标EXE/DLL后,通过导入的库文件和函数,不支持xp的函数全部修改重定位到 xpstub.dll 里面 +## Introduction -## 核心模块 +`MakeXPStub` is a utility designed to make your PE (Portable Executable) files compatible with Windows XP. This is particularly useful for executables compiled with Rust, which may not natively support Windows XP. The tool operates by modifying the Import Address Table (IAT) of the target executable to forward incompatible API calls to `xpstub.dll`. This DLL contains implementations that make these APIs compatible with Windows XP. The underlying implementation for these thunks is sourced from [YY-Thunks](https://github.com/Chuyu-Team/YY-Thunks). -通过xp兼容的lib来判断函数是否支持, 例如路径`C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib` +## Features -通过 `dumpbin` 生成函数列表,例如 `dumpbin /EXPORTS [TARGETLIB] > [TARGET.TXT]` +- **Modify PE Files**: Automatically update the IAT to make your executables XP-compatible. +- **DLL Forwarding**: Forwards incompatible API calls to `xpstub.dll`. +- **Built for Rust**: Tailored for executables compiled with Rust but can be used for any PE file. +- **Minimal Footprint**: Generates minimal patches that can be easily distributed. -### kernel32 +## Prerequisites -存在比较多的函数变动 +- Rust Toolchain +- Windows SDK +- NMake (For building `xpstub.dll`) +## Compilation + +To compile the project, you need to execute two commands: + +1. Build the native components with the batch script: + + ```bash + make.bat + ``` + +2. Then build the Rust components: + + ```bash + cargo build --release + ``` + +## Usage + +After the compilation steps, you can use the `makexpstub.exe` command-line utility to convert your executables. Here's the basic syntax: + +```bash +makexpstub.exe --input a.exe --output a-xp.exe +``` + +This will read `a.exe`, modify its IAT, and produce `a-xp.exe` which will be compatible with Windows XP. + +## Contributing + +We welcome contributions and bug reporting. Feel free to open an issue or submit a pull request. + +## Acknowledgements + +A big thank you to the [YY-Thunks project](https://github.com/Chuyu-Team/YY-Thunks) for providing the essential API implementations that made this project possible. + +## License + +This project is licensed under [MIT License](https://chat.openai.com/c/LICENSE). + +For more details, please refer to the [LICENSE](https://chat.openai.com/c/LICENSE) file in the repository.