Reverse engineering Diablo v1.09b (last patch)
#12
Hello.

I noticed that the 'site' as a whole is no longer functioning, but the sub-addresses seem to load:
-> https://a3n.home.xs4all.nl/Item.htm

This is from patch v1.07 or v1.08 (I cannot remember which). It seems to hint that the first 3 bytes of an item (what I've been calling a "randomized ID" or "item header") is actually some sort of stored pointer address referencing the magic prefix/suffix and the 4th byte is the item's base type (I think)?

In v1.09: It would appear that the item's graphics (in every respect) is at a totally different offset.

Based on random trial-and-error (with no forethought, planning or prediction): The first 3 bytes refer to a magic item's prefix and the latter 3 bytes refer to a magic item's suffix.

Code:
Magic Club = Club of the Mind
87 E4 3C 78 C1 00

Editing this to a new value:
Code:
Magic Club = Club of the Sky
00 00 00 78 C1 00

I do not know if it's still some sort of function pointer or variable pointer or what.

What little I do know is this:
The item (upon loading a game) is generated at a different offset (initially) before being copied to the player inventory (seems logical).

0x18F948 is the temporary buffer.
EAX appears to have been loaded (by the time I saw the value) with the item's header.

Any ideas would be greatly appreciated!

EDIT: I am still trying to figure this one out, but I think I have an idea (or partial explanation as to what's really going on)...

This is the function called when items are spawned (Barrels, monsters, new player file, etc):
Code:
0042084A | 55                       | push    ebp                                       |

There seems to be some magic number to multiply by (EDI is multiplied by a full item size of 76 bytes; ESI I do not know what is used for 100%; It's multiplied by 368).
Anyway!

There seems to be a collection (v-table of pointers?) of data resting at the static address of:
Code:
0x00491F10

Specifically, at this address there are two 4-byte pointers side-by-side with a possible flag value of 01 (Normal / White item).
Code:
00491F10  08 2C 49 00 70 25 49 00 01 00 00 00 1E 00 00 00  .,I.p%I.........

The following "1E" I do not understand what it represents (possible item data for the graphics of the bow?). Shortly after, there is a "4" (declaring it's of a weapon slot type) and some more misc. data.
Reply


Messages In This Thread
RE: Reverse engineering Diablo v1.09b (last patch) - by TheKillerVortex - 02-02-2018, 02:07 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)