[1.10f] Sharing My D2 Functions and DRLG Structures Spreadsheets

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
Mentor
Junior Member
Champion of the Light
Posts: 359
Joined: Wed Dec 07, 2005 6:24 pm
Contact:
Romania

[1.10f] Sharing My D2 Functions and DRLG Structures Spreadsheets

Post by Mentor » Mon Aug 12, 2019 12:42 pm

Hello, fellow coders!

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:
  1. a call spreadsheet and
  2. 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

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.10f] Sharing My D2 Functions and DRLG Structures Spreadsheets

Post by devurandom » Wed Sep 11, 2019 12:10 pm

It snowed a few days before June 2019 where I live, it's very rare, but I haven't seen Christmas in August till now.
This is an insane amount of work you've posted.

Thank You!

Image
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

AntiRush
Posts: 3
Joined: Wed Jun 03, 2015 3:09 am

Re: [1.10f] Sharing My D2 Functions and DRLG Structures Spreadsheets

Post by AntiRush » Sat Nov 16, 2019 3:45 am

This is awesome! Thank you!

I hadn't looked at windows d2 in a while.

It's probably obvious to most people, but these notes are for a rebased D2Common.dll.

Here's a quick ida script I wrote to copy over the names. I only used it on d2common but it should work for the others.

You'll need to export the excel file as a csv without the 2 lines of headers. I attached mine for d2common.
Attachments
idaimport.tar.gz
(65.8 KiB) Downloaded 81 times

Grimz
Posts: 18
Joined: Tue Apr 12, 2016 10:59 pm

Re: [1.10f] Sharing My D2 Functions and DRLG Structures Spreadsheets

Post by Grimz » Wed Oct 28, 2020 9:58 pm

WOW Dude incredible! Nice work!

Post Reply

Return to “Code Editing”