<?xml version="1.0"?>
<rss version="2.0">
    <channel>
        <title>OpenRCE: Blog</title>
        <link>http://www.openrce.org/rss/feeds/blog</link>
        <description>OpenRCE: The Open Reverse Code Engineering Community</description>
                <item>
            <title>Second Round-More Neocron2 client.exe reversing</title>
                            <pubDate>Wed, 02 Apr 2008 15:42:40 -0500</pubDate>
                                        <link>https://www.openrce.org/blog/view/1099/Second_Round-More_Neocron2_client.exe_reversing</link>
                                        <author>RabidCicada &lt;email-suppressed@example.com&gt;</author>
                                                    <description>Well,&lt;br /&gt;
So far so good.&amp;nbsp;&amp;nbsp;I've continued to reverse the game client but haven't made much progress recently(lack of time and complications). Remember I'm new.&lt;br /&gt;
&lt;br /&gt;
I have continued trudging through the main client.exe(out of stubborness) instead of following my intuition that I should be looking else-where for the meat of the logic I want to alter(character data).&lt;br /&gt;
&lt;br /&gt;
My initial thoughts were to track button presses/other character alterations while in game.&amp;nbsp;&amp;nbsp;The only problem is that i don't have a code coverage tool yet and am using an out of date IDA Pro(I'll be getting the newest one soon :) ).&amp;nbsp;&amp;nbsp;I would find where, say, UP was handled to move the character foward(and hopefully alter character data).&amp;nbsp;&amp;nbsp;Then start tracking things nearby(probably character data).&lt;br /&gt;
&lt;br /&gt;
An additional complication is that there are multiple threads( about 5 if I remember right) and I think all the important game logic occurs in another thread(other than the main one) started as part of a &amp;quot;game&amp;quot; object (what I believe to be all the important stuff, or at least have a lot of the important stuff).&lt;br /&gt;
&lt;br /&gt;
The Client loads a couple DLLs made for the game and one of them is the &amp;quot;game&amp;quot; from gamebase.dll built on top of a game engine(from another DLL).&amp;nbsp;&amp;nbsp;I finally left behind client.exe and am beginning to deadlist gamebase.dll.&amp;nbsp;&amp;nbsp;It looks like the one of interest.&lt;br /&gt;
&lt;br /&gt;
My plan so far is that I'm going to deadlist a little to reverse some data structures.&amp;nbsp;&amp;nbsp;I'll port any gleaned information over to client.exe.&lt;br /&gt;
&lt;br /&gt;
Here's where I'd appreciate some comments and advice on the blog entry. &lt;br /&gt;
&lt;br /&gt;
My intention all along was to track character data alteration from keypresses.&amp;nbsp;&amp;nbsp;The problem is that that data is handled(I think) in something from a dll(gamebase) in another thread.&lt;br /&gt;
&lt;br /&gt;
I'd like to continue with the original plan to track character data alteration but I'm now unsure as to how to track the keypress data.&amp;nbsp;&amp;nbsp;I'm familiar with the windows paradigm of passing messages to/from windows.&amp;nbsp;&amp;nbsp;I'm familiar with the peek/get, translate, dispatch loop and the WndProc callback.&lt;br /&gt;
&lt;br /&gt;
One thing I'm not sure about is whether each thread will get it's own or if all that data has to go through Client.exe (only one with a window).&amp;nbsp;&amp;nbsp;I think it has to go through Client.exe.&amp;nbsp;&amp;nbsp;If thats the case then I will need to finish tracing the path of a keypress through the system in client.exe&amp;nbsp;&amp;nbsp;(I've already started).&lt;br /&gt;
&lt;br /&gt;
From what I see they create and inputobject then I need to find out how they pass it to the other thread.&lt;br /&gt;
&lt;br /&gt;
On a side note I found a funny little easteregg that I haven't tried yet.&amp;nbsp;&amp;nbsp;Among many other commands they accept at the commend line when calling client.exe they accept one particular switch &amp;quot;hubbletubblewubble&amp;quot;.&amp;nbsp;&amp;nbsp;I wonder what it does?....Only one way to find out:).&lt;br /&gt;
~hopes for god mode in online play~&lt;br /&gt;
&lt;br /&gt;
Oh,&lt;br /&gt;
Any advice on debugging threads in an executable would be great.&amp;nbsp;&amp;nbsp;I have yet to read up on it but I assume that there are some gotcha's when you want to debug some code that is run in a spawned thread off of the main executable(as is the case here with the game object).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</description>
                    </item>
                <item>
            <title>First Round-Rabid</title>
                            <pubDate>Mon, 17 Mar 2008 10:28:41 -0500</pubDate>
                                        <link>https://www.openrce.org/blog/view/1087/First_Round-Rabid</link>
                                        <author>RabidCicada &lt;email-suppressed@example.com&gt;</author>
                                                    <description>Righto,&lt;br /&gt;
&lt;br /&gt;
So my first real foray into reversing just went down.&amp;nbsp;&amp;nbsp;With the help of this site and it's people I won the round and am back in the ring for round 2.&amp;nbsp;&amp;nbsp;The Neocron2 game client is going down:).&lt;br /&gt;
&lt;br /&gt;
Deadlisting is easy for me but getting into debugging was a tiny bit tricky:).&lt;br /&gt;
&lt;br /&gt;
Problem was I couldn't debug the application and have it work correctly.&amp;nbsp;&amp;nbsp;It kept breaking on certain breakpoints in ntdll.dll and then when I overcame that it kept failing to open an ini file.&lt;br /&gt;
&lt;br /&gt;
Solution was to alter the &amp;quot;events of interest&amp;quot; for IDA pro and set the working directory in the debugger for the executable.&lt;br /&gt;
&lt;br /&gt;
Doh.&amp;nbsp;&amp;nbsp;Now I sure felt like an idiot but, hey, eveyrone's gotta learn somehow.&amp;nbsp;&amp;nbsp;I had assumed that that the working directory only needed to be set if it was supposed to be different than the &amp;quot;default&amp;quot; of the exe's current directory.&amp;nbsp;&amp;nbsp;That's not the case, and I hadn't actually really thought about troubleshooting that.&amp;nbsp;&amp;nbsp;I assumed it was a problem elsewhere in my setup.&lt;br /&gt;
&lt;br /&gt;
The other issue was to do with what events the debugger was interested in.&amp;nbsp;&amp;nbsp;I now realize that it was probably stopping on every dll load and that would explain why I had to pass on a couple the first few times.&amp;nbsp;&amp;nbsp;Then I found the settings for events of interest and played with them till the program loaded all the way and hit winmain.&lt;br /&gt;
&lt;br /&gt;
I think I may have chosen a large project, being that the exe imports a crap load of stuff from other game dlls but I liked the game when I played it and figure I'll actually expend the effort to take a look at it from the inside.&lt;br /&gt;
&lt;br /&gt;
One lesson that was reinforced here was to think about the simple/obvious things.&amp;nbsp;&amp;nbsp;I initially had a suspicion that the problem was anti-debug (having a security focused job).&amp;nbsp;&amp;nbsp;I spent time looking for it and ruled it out after some investigation.&amp;nbsp;&amp;nbsp;The actual problem was staring me in the face the whole time &amp;quot;It can't find the file you idiot&amp;quot;.&amp;nbsp;&amp;nbsp;And I overlooked it for a small time:).&lt;br /&gt;
&lt;br /&gt;
</description>
                    </item>
            </channel>
</rss>
