Log in

View Full Version : isolating an in game instruction?


Naked2
January 30th, 2007, 22:34
I am trying to locate an in game instruction from a keypress that triggers and limits the amount of functions in the game. My main goal is to isolate the area/event triggered by pressing ctrl and figure out which instruction to modify that will allow an X amount of in game functions as opposed to only one function per turn, which is what the game is programmed to do.

Woodmann
January 31st, 2007, 00:01
And you have tried something to help you ?

Woodmann

Aimless
January 31st, 2007, 08:41
Hi Naked. You need to address more than just this aspect. Remember, this is a HELP forum, not a FAQ forum.

Show what you have done so far in isolating the same (no matter if you were unsuccessful, that's alright). We would like to see some pointers as to what your approach was. Do that and after that we're here to help.

You might try looking at DIRECTX or WINAPI documentation that first of all is used in the keypress (does the author use personal routines to access the h/w or does he use the DIRECTX or WINAPI components to do so - is the first thing you should be asking). Once you discover that, it all downhill from there...

Do some work. We will wait for you.

Have Phun

Naked2
January 31st, 2007, 13:01
Thanks for the reply. Maybe I should take a few steps back and state my initial problem with OllyDbg. The game cannot be run in Windowed Mode, so when even attempting to execute or attach Olly to the app, it freezes my pc and renders it useless. Any ideas on this?

Silver
January 31st, 2007, 13:10
Is it a DirectX app? Sounds like it. If so, search the board for posts from Waxford Squeers, Maximus and myself about this.

Naked2
February 2nd, 2007, 21:43
Well I managed to force the game to run in windowed mode with a useful tool I found about the web. I can now debug the directx based game.

When breaking on an instruction within the vicinity I am trying to close in on, I see a whole bunch a dwords in the disassembler like this: PTR DS :[eax+10h] mov ecx......

Are these function call outs? If not, what does such an instruction look like, and would the values of the in game function be hidden/encrypted, or would they be a simple 1 for 1 function or 2 for 2 and so on?

FrankRizzo
February 2nd, 2007, 22:55
WOW. If you don't understand assembly, you're going to have a very difficult time finding what you want to fix. I'd recommend a good assembly tutorial before you go trying to hack on something.

Now, to answer your question:

If you are familiar with high level languages only, then assembly will seem very strange. For instance just storing a value in a variable can be done several ways, and most of them won't make any sense to you. Let's say:

in C you have:

int myVar;
myVar = 15;

In assembly you'd have something like this:

mov eax, 0000000F
mov dword ptr:[(address of myVar in memory)], eax

So, from a high level language point of view, it takes A LOT of assembly instructions to do anything "meaningful". (Don't even get me started on what it takes to call a function!)

So, start with the assembly tutorials, or maybe a good book on assembly if you're serious.