Skip to content

Decompiling Tips OllyDbg

Margen67 edited this page Apr 22, 2021 · 5 revisions

Here are some tips you might find that come in handy while decompiling the game. See also Decompiling Tips IDA as a lot of those tips will be the same. Currently it is preferred to use IDA but if you want to use OllyDbg here are a few tips. I would suggest using version 2.01 as it makes it a bit easier to read. Unlike with IDA you don't have any offsets labelled and there is no handy database to add on that will give them. You will have to decompile the code first and then trawl through the C libraries to see if an offset has been identified. You can use OllyDbg to debug original RCT2 code and at the same time debug a decompiled C function. This is very handy for working out bugs.

Olly is not nearly as powerful as IDA but it does have its features.

Getting Around

The most important command when using Olly is CTRL+G this can be used to jump to a specified address. When you want to decompile a function first find out the address and then type it into the box. This will move you to the first line of the function.

Using Strings

You can use Olly to search for specific strings. To do this click the M button and right click at the top and search for the string. When the string has been found you can right click it and search for any references. This can be used as a way to jump between debugging the .dll file and the .exe. You will find that some of my (duncanspumpkin) code whilst it is being worked on contains random strings. I use them to ensure I can place a breakpoint before jumping back to .exe code (RCT2_CALLPROC).

Clone this wiki locally