@echo off rem This tries to apply the 2-byte Outlook LDAP userSMIMECertificate;binary bug fix to EMABLT32.DLL rem No promises that it will work for all installations. It is your responsibility to backup original files. rem "https://devblogs.microsoft.com/oldnewthing/20120731-00/?p=7003" SetLocal EnableDelayedExpansion set RESULT="" pushd "c:\Program Files" for /f "delims=" %%i in ('dir /b EMABLT32.DLL /s ^| findstr /V "Download"') do set RESULT=%%i popd if "%RESULT%" == """" ( pushd "c:\Program Files (x86)" for /f "delims=" %%i in ('dir /b EMABLT32.DLL /s ^| findstr /V "Download"') do set RESULT=%%i popd ) if "%RESULT%" == """" ( echo No EMABLT32.DLL found goto :eof ) echo Found %RESULT% copy /Y "%RESULT%" foo.dll for /f %%i in ('certutil -hashfile foo.dll sha256 ^| findstr /V "SHA256 hash"') do set RESULT=%%i rem echo Found %RESULT% rem goto :eof certutil -encodehex -f foo.dll foo.dll.hex 12 1>NUL set office15=2321582367c5cfea0ec770fa6bb1114898b28f323a46fda80685f2b158f8f4db set office16=9db867b0682212d8b1608749e9ecd3990f3685fc4d3750d38c747561d10dcbce set office365=93dc726684ed70caeea5f32a7cd2a6b1fce6f6ad61168d1400b8d2c77bb81a3e if %RESULT% == %office15% ( echo Office15 05be8016 05be581a @PowerShell "(GC .\foo.dll.hex)|%%{$_ -Replace '05be8016','05be581a'}|SC .\foo.dll.hex.mod" ) else ^ if %RESULT% == %office16% ( echo Office16 8d3d7b7c 8d3dcb80 @PowerShell "(GC .\foo.dll.hex)|%%{$_ -Replace '8d3d7b7c','8d3dcb80'}|SC .\foo.dll.hex.mod" ) else ^ if %RESULT% == %office365% ( echo Office365 0ceb05bf38680110 0ceb05bf0c6c0110 @PowerShell "(GC .\foo.dll.hex)|%%{$_ -Replace '0ceb05bf38680110','0ceb05bf0c6c0110'}|SC .\foo.dll.hex.mod" ) else ( echo No file matching Bug Fix for %RESULT% goto :eof ) certutil -decodehex -f foo.dll.hex.mod foo_mod.dll certutil -hashfile foo_mod.dll sha256 echo Your modifed EMABLT32.DLL is foo_mod.dll. Backup your old one and try this in place.