d2r_offline is a compact C++ project for reproducing the offline startup/session flow of Diablo II: Resurrected without the Blizzard launcher through a proxy winhttp.dll.
The project does the following:
- replaces
winhttp.dllwhile forwarding the original WinHTTP exports to the real system library - publishes the expected environment and registry responses
- patches the trusted
PUBLIC KEYin the Diablo II: Resurrected process memory - generates a compatible
%LocalAppData%\Blizzard Entertainment\ClientSdk\cookie.bin
src/config— config loading and locale normalizationsrc/crypto— Windows CNG/CryptoAPI backend and Serpent CTRsrc/cookie— claims, machine context, cryptobox, andcookie.binwritingsrc/exports— export list and asm forwarderssrc/proxy— process bootstrap and WinHTTP forwarder loadingsrc/runtime— runtime patches and registry hook implementationsrc/support— shared types, key material, logging, and platform helpers
Requirements:
- Windows x64
- Visual Studio 2022 Build Tools
Build:
powershell -ExecutionPolicy Bypass -File .\build.ps1Output:
build\winhttp.dll
To use the proxy with Diablo II: Resurrected:
- Either build the project and take
build\winhttp.dll, or downloadwinhttp.dllfrom the project release. - Copy
winhttp.dllinto the game directory, next to the main game executable. - Start the game executable directly, without the Blizzard launcher.
- On first launch, let the DLL generate
d2r_offline.iniautomatically or place your own config next towinhttp.dll. - After a successful start, the offline cookie will be written to
%LocalAppData%\Blizzard Entertainment\ClientSdk\cookie.bin.
Recommended first-run checks:
d2r_offline.logis created next towinhttp.dllcookie.binis created under%LocalAppData%\Blizzard Entertainment\ClientSdk\- the game starts with the expected language and offline session state
The DLL looks for d2r_offline.ini next to itself. If the file does not exist, it is created automatically:
[Settings]
Locale=english
LocaleAudio=english
Entitlements=hd,beta,rotw-dlcSupported keys:
LocaleLocaleAudioEntitlements
Supported Locale and LocaleAudio values:
english->enUSgerman->deDEspanish->esESlatam->esMXfrench->frFRitalian->itITkoreana/korean->koKRpolish->plPLbrazilian->ptBRportuguese->ptPTrussian->ruRUtchinese->zhTWschinese->zhCNjapanese->jaJP
You can also provide a Blizzard locale code directly, for example enUS or ruRU.
The runtime log is written to d2r_offline.log next to the DLL and is recreated on every launch.
- the output file remains
winhttp.dllbecause the client loads that exact module name - the implementation targets practical compatibility, not binary identity
- the crypto layer uses Windows CNG/CryptoAPI and vendored Serpent