Web Rarely

Being Ymor's right-hand man was like being gently flogged to death with scented bootlaces. -- Terry Pratchett, "The Colour of Magic"

Introducing ExePatch

2014-03-17

While creating mods for Sid Meier's Pirates!, I found it very frustrating to try to make substantial changes to the game's executable using IDA Pro because the built-in assembler is very limited and can only assemble one instruction at a time, and if you make a mistake you may have to type the whole program again from scratch! Furthermore, the free hex editors for Windows tend to be buggy, and typing machine code into a hex editor is error-prone. So I created a basic assembly IDE to help me write mods and patch executables, called ExePatch. I didn't expect to release it, but I thought it might be helpful for others.

In lieu of a long text introduction, I'll just embed the tutorial video.


Download tutorial video: ExePatchTut.avi (15.1MB, but the YouTube video is better because I've corrected some errors via annotations.)

Download ExePatch: ExePatch.zip (version 1.1, or get the source code)

Comments

Cool, but have you tried Multiline Ultimate Assembler? 2015-03-27 12:12PM
Seems like the perfect tool for your task.
an anonymous Paul
RE: Multiline Ultimate Assembler 2015-03-27 09:30PM
It's a similar tool, but it seems very rudimentary. It only has one button: Assemble. It doesn't appear to be able to save the source, patch IDA databases, etc.
RE: RE: Multiline Ultimate Assembler 2015-03-28 04:55AM
> It doesn't appear to be able to save the source

The assembly source, that is? Ctrl+S to save it to a file. The tab is automatically saved between sessions.

> patch IDA databases

Well, it's an OllyDbg plugin. What is there to patch in an IDA database?

In general, it allows you to patch the commands into the memory of the debugged process, and OllyDbg allows you to save modifications to file.
an anonymous Paul
RE: Multiline Ultimate Assembler 2015-03-28 11:53PM
Well it seems like a decent tool for OllyDbg, but I usually use IDA since it has a lot more features to aid understanding of large programs.

> What is there to patch in an IDA database?
It imports the executable into the database, so changing the .exe on disk can cause them to get out of sync, which can cause unexpected behavior if you try to debug it using IDA, etc. Plus, importing changes into IDA is a good way to check that they look alright and mesh with the surrounding code.
Population Overflow 2024-02-06 06:46AM
an anonymous Guardian
Population Overflow 2024-02-06 06:47AM
How hard would it be to fix city population overflowing from 50k back to 0?
an anonymous GuardianGI
RE: Population Overflow 2024-02-17 11:24PM
Hi, Guardian. Are you talking about Sid Meier's Pirates? If so, I guess it'd take somewhere between 5 and 15 hours of work, in part because I haven't thought about that stuff for a decade at least...

Add a comment

Note: The information you enter (including your name and email address) will be displayed publicly.




Line breaks are converted to <br>'s, and all HTML tags except b, u, i, tt, and pre are filtered out.