Seeing how I've been on and off for about 7 years now, it's time I did something long overdue.
First - a bit of background.
After joining the PK community in 2005, I took up Code Editing in about 2007, an endeavor that lasted until about 2012. At that time, there were few resources and it was a time for discovery and - with each discovery - growth, challenges undertaken by our veterans. As with all communities, there are those who invest time and effort, discover and share, encourage / inspire others; they keep momentum and stimulate growth in the community. My work (and anyone's for that matter) in Code Editing wouldn't have been possible without their discoveries, knowledge sharing and help.
I feel it's time I paid it forward the best I can and leave something behind. I am sharing the resources (functions and structures) I put together while reversing the DRLG code and a great deal of D2Common.dll. It's a miracle I still have them after 3 HDD crashes and, since it's no longer against the TOS, it's perfect timing. Linked to this post you can find:
- a call spreadsheet and
- a DRLG structures spreadsheet, containing:
- ~1300 D2Common functions - about 400 are DRLG
- D2Common functions related to Items, Path, Missiles, Skills, Inventory, Stats, States, Collision (a lot of them previously undocumented)
- ~410 D2Game functions
- ~140 D2Client functions
- + functions in other libraries
- DLL base, offset or ordinal, ECX/EDX (registers used for fastcalls), P1-P15 (arguments on stack), return type, comments and a formula for generating def.
- structures distributed on sheets; links inside file will allow you to jump back and forth between structures (I found it useful while reversing in Olly).
Please keep in mind these are old notes, which were laid down in a hurry and over a long period, so expect errors, different naming conventions.
However, I did my best to name params/functions/structures/members as close to self-explanatory as possible.
I'm afraid I won't be stopping by too often or for too long, but I will do my best to answer questions, if any arise. If so, please post them here (not via PM).
Even though I reversed quite a great deal of the DRLG, I don't take credit for everything: apart from the knowledge available on the Keep, a lot of conversations and code-sharing with Nefarius and Necrolis helped complete the research / filling the gaps, allowing for us to have almost 100% reversed structures.
I would be amiss if I didn't take the time to thank the veterans - Myhrginoc, SVR, Joel, Paul Siramy, Volf, Kingpin - for me (and I know I'm not the only one) they inspired me to start my journey into reverse-engineering and take on the DRLG.
I hope this will contribute to your reversing / coding endeavors (or will, at least, save some time) and I hope you will enjoy them as much as I enjoyed unraveling D2's inner workings.
1.10f Functions | 1.10f DRLG Structures