Names fall under trademark law and even names that they've bothered to apply for (let alone all those rejected for various reasons) aren't difficult to change.
Story is a different question. The core story is incredible thin and derivative. Creating a new story wouldn't be very hard. That said, most players today would probably be much more interested in multiplayer anyway.
They haven't copied the code but re-implemented (in another programming language that didn't existed when this game was originally released).
For example here they take the original text from the game for the labels: https://github.com/OpenDiablo2/OpenDiablo2/blob/37ae98d81b79...
For sure most of the game specific data can be extracted from the game files but it's unlikely that there are no artifacts in the game code itself.