Reverse engineering and patching a DirectX game?

Posted by yodaj007 on Stack Overflow See other posts from Stack Overflow or by yodaj007
Published on 2010-03-15T05:27:35Z Indexed on 2010/03/15 5:29 UTC
Read the original article Hit count: 642

Background

I am playing Imperishable Night, one of the Touhou series of games. The shoot button is 'z', moving slower is 'shift', and the arrow keys move. Unfortunately for me, using shift-z ghosts my right arrow key, so I can't move to the right while shooting. This ghosting happens in all applications, and switching keyboards fixes it.

Goal

I want to locate in the disassembled code the directx function that gets the keyboard input and compares it against the 'z' key, and change that key to 'a'. I'm considering this a fun project. Assuming the size of the scan codes are the same, this should be fairly simple. And because the executable is only 400k, maybe this will provide a unique opportunity for me to explore the dark side of the computing underworld (kidding).

Relevant experience

I have some experience with coding in assembly, but not in the disassembly of such. I have no experience with the DirectX apis.

Question

I need some guidance. I've found a listing of directx keyboard scan codes, and a program called PEExplorer that looks like it will do what I need.

Is there a means by which I can turn some of the assembly with C function calls so it's more easily read? I will need to locate where the game retrieves the currently pressed keys, compares those against a list, and it's that list I need to modify.

Any input would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about directx

Related posts about reverse-engineering