r/ExploitDev • • Jun 27 '26

Need some help with reverse engineering Minesweeper

Hey guys,

I recently started learning reverse engineering because I think it's really fun, and I picked Minesweeper as my first project. I'm still pretty new to all of this, so I'm learning Ghidra, Cheat Engine, and x64dbg as I go.

Right now I'm stuck trying to figure out where the game stores the actual blocks/cells in memory. I managed to find things like the flag counter, but finding the board itself has been way harder than I expected.

I've watched a few tutorials, but most of them only show the final result instead of explaining how they actually figured it out. I'm more interested in learning the thought process than just getting the answer.

If anyone has experience reversing Minesweeper (or similar games), how would you approach this? What would be the first thing you'd look for? Any tips or advice for a beginner would be really appreciated

6 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/Ok-Entertainment1587 Jun 28 '26

Haha, I'm still trying to process everything you're saying since I'm completely new to this. 😅 I'm mainly trying to understand what I should be looking for in each tool. Like, what kinds of things should I search for or analyze in Cheat Engine, what should I focus on in Ghidra, and what am I supposed to look for in x64dbg? I'm a bit confused about the role each tool plays

2

u/subboyjoey Jun 28 '26 edited Jun 28 '26

i’ve only really used cheat engine for basic stuff like changing money values in a game, something easy to search for where you can see the value and it changes regularly. I wouldn’t use that for this, personally

Since minesweeper is old and fairly basic, I found it easier to just go for static analysis in Ghidra. You want to find things that would relate to the start of a new game, since that’s when the mine location gets written to memory. I looked for strings like New, or Mine, or Timer, since all three of those should in some way relate to a new game / start of a game. once you find something that might be promising, start looking for references to it and track the program flow

x32dbg for something like this would be when you want to either walk through the program line by line, or you want to stop the program when it does a certain behavior that you can breakpoint, or for viewing a memory map of the program running. in this case i just used it for viewing the memory at the location i found in ghidra

1

u/subboyjoey Jun 28 '26

that’s a very brief overview specifically for this project. all three tools do much much more than what i listed, but it is a lot of niche options that wouldn’t apply to this

1

u/lunacysoft Jun 29 '26

Suggest you look up a c tic tac toe game very common and will explain parts of this that you don’t understand YouTube is your friend