{"id":19054830,"url":"https://github.com/zhuagenborn/minesweeper-cheat","last_synced_at":"2025-09-18T23:48:07.097Z","repository":{"id":115570149,"uuid":"388936748","full_name":"Zhuagenborn/Minesweeper-Cheat","owner":"Zhuagenborn","description":"💣 A game cheat for Microsoft Minesweeper. It will change the window title to \"Mlnesweeper\" if the current block has a mine.（微软扫雷游戏的作弊工具，如果当前方块有雷，窗口标题会被修改为“Mlnesweeper”。）","archived":false,"fork":false,"pushed_at":"2024-07-16T03:57:30.000Z","size":273,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-20T08:09:32.832Z","etag":null,"topics":["game","game-cheating","hook","minesweeper","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zhuagenborn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-23T22:01:55.000Z","updated_at":"2025-04-14T01:47:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf36a1aa-5173-4c04-997c-3521c7b68f0c","html_url":"https://github.com/Zhuagenborn/Minesweeper-Cheat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Zhuagenborn/Minesweeper-Cheat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhuagenborn%2FMinesweeper-Cheat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhuagenborn%2FMinesweeper-Cheat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhuagenborn%2FMinesweeper-Cheat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhuagenborn%2FMinesweeper-Cheat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zhuagenborn","download_url":"https://codeload.github.com/Zhuagenborn/Minesweeper-Cheat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhuagenborn%2FMinesweeper-Cheat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260907159,"owners_count":23080613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","game-cheating","hook","minesweeper","reverse-engineering"],"created_at":"2024-11-08T23:39:54.748Z","updated_at":"2025-09-18T23:48:01.995Z","avatar_url":"https://github.com/Zhuagenborn.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *Minesweeper* Cheat\n\n![MASM](docs/badges/MASM.svg)\n[![Windows](docs/badges/Microsoft-Windows.svg)](https://www.microsoft.com/en-ie/windows)\n![License](docs/badges/License-MIT.svg)\n\n## Introduction\n\n![Cover](Cover.jpg)\n\nA game cheat for *Microsoft Minesweeper*. It will change the window title to \"*Mlnesweeper*\" if the current block has a mine.\n\n## Getting Started\n\n### Prerequisites\n\n- Install [*MASM32*](http://www.masm32.com).\n- Set the `PATH` environment variable.\n\n### Building\n\nRun the `build.ps1` file directly:\n\n```console\nPS\u003e .\\build.ps1\n```\n\nThe `cheat.dll` will be generated in the `bin` folder.\n\n### Usage\n\n\u003e The project has been only tested with the provided game version.\n\u003e\n\u003e The *MD5* of `Minesweeper.exe` is `9C45D38B74634C9DED60BEC640C5C3CA`.\n\nThe `cheat.dll` must be injected into the game to activate its function. You can directly use this simple injection tool: [*Dll-Injector*](https://github.com/Zhuagenborn/Windows-DLL-Injector).\n\n```console\nDll-Injector Minesweeper cheat.dll\n```\n\nThe window title will become \"*Mlnesweeper*\" if the current block has a mine.\n\n![cheat](docs/images/cheat.png)\n\n## Reverse Engineering\n\n### Graphic\n\n*Microsoft Minesweeper* uses the `BitBlt` function to draw its mine area.\n\n![loop-bitblt](docs/images/loop-bitblt.png)\n\n`0x01005334` and `0x01005338` are the addresses of the mine area's width and height. When the game executes at `0x01002700` for the first time, the mine area is empty.\n\n![empty-area](docs/images/empty-area.png)\n\nThe stack is shown as below:\n\n![bitblt](docs/images/bitblt.png)\n\nAccording to the declaration of `BitBlt`, the pixel coordinate of the *top-left* corner of the mine area is *(12, 55)*. And the side length of a block is *16*.\n\n```c\nBOOL BitBlt(HDC hdc, int x, int y, int cx, int cy, HDC hdcSrc, int x1, int y1, DWORD rop);\n```\n\n### Mine Data\n\nAt `0x01002669`, the game reads mine data from `0x01005340`.\n\n![read-mine-area](docs/images/read-mine-area.png)\n\nFor the following mine area:\n\n![game-end](docs/images/game-end.png)\n\nThe data around `0x01005340` are organized as:\n\n![mine-data](docs/images/mine-data.png)\n\nIt is clear that each `0x8A` means a mine and `0xCC` is the activated mine.\n\n## License\n\nDistributed under the *MIT License*. See `LICENSE` for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuagenborn%2Fminesweeper-cheat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhuagenborn%2Fminesweeper-cheat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuagenborn%2Fminesweeper-cheat/lists"}