I used to have this problem few patches ago, what I did was, follow these tips at
https://tsw.median-xl.com/join . Now i only get the error when i exit the game, but not when playing it.
If you get a c0000005 error when clicking on "Multiplayer", add Diablo II to Windows DEP as an exception:
Open Explorer, right-click Computer, Advanced System Settings, Advanced tab, Settings in Performance section, Data Execution Prevention tab.
Choose Turn on DEP for all programs and services except those I select, Add, find Diablo II.exe and Game.exe, add them both and Apply after each