bg3_degoblinifier.bat

run .bat in your steam version of BG3 bin folder
 avatar
unknown
batchfile
5 months ago
3.0 kB
54
No Index
@echo off
REM Step 1: Verify original bg3.exe MD5 checksum
echo Verifying original bg3.exe checksum...
certutil -hashfile bg3.exe MD5 | find /i "e1f0db94dea4d0b90322fcdf001135d0" > nul
if errorlevel 1 (
    echo.
    echo Error: bg3.exe checksum does not match. ONLY for STEAM version: 2024-10-01 4.1.1.5970269 Hotfix #27
    pause
    exit /b 1
)

REM Step 2: Verify original bg3_dx11.exe MD5 checksum
echo Verifying original bg3_dx11.exe checksum...
certutil -hashfile bg3_dx11.exe MD5 | find /i "5d64e200bb0c25b272602826775e3edc" > nul
if errorlevel 1 (
    echo.
    echo Error: bg3_dx11.exe checksum does not match. ONLY for STEAM version: 2024-10-01 4.1.1.5970269 Hotfix #27
    pause
    exit /b 1
)

REM Step 3: Download xxd-win64-msvc.zip
echo Downloading xxd-win64-msvc.zip...
powershell -Command "Invoke-WebRequest -Uri 'https://github.com/ckormanyos/xxd/releases/download/v1.2/xxd-win64-msvc.zip' -OutFile 'xxd-win64-msvc.zip'"

REM Step 4: Extract xxd-win64-msvc.zip
echo Extracting xxd-win64-msvc.zip...
powershell -Command "Expand-Archive -Path 'xxd-win64-msvc.zip' -DestinationPath 'xxd' -Force"

REM Step 5: Create backups of bg3.exe and bg3_dx11.exe
echo Creating backup of bg3.exe...
copy "bg3.exe" "bg3_backup.exe"

echo Creating backup of bg3_dx11.exe...
copy "bg3_dx11.exe" "bg3_dx11_backup.exe"

REM Step 6: Create patch files for both executables
echo Creating patch file for bg3.exe...
echo 3F2EA10: C3 CC CC CC CC > patch_bg3.hex

echo Creating patch file for bg3_dx11.exe...
echo 3EF33F0: C3 CC CC CC CC > patch_dx11.hex

REM Step 7: Apply the patch to bg3.exe using xxd
echo Applying patch to bg3.exe...
xxd\xxd.exe -r - bg3.exe < patch_bg3.hex

REM Step 8: Apply the patch to bg3_dx11.exe using xxd
echo Applying patch to bg3_dx11.exe...
xxd\xxd.exe -r - bg3_dx11.exe < patch_dx11.hex

REM Step 9: Verify patched bg3.exe MD5 checksum
echo Verifying patched bg3.exe checksum...
certutil -hashfile bg3.exe MD5 | find /i "9c4ba705603a4c5624c90361a3a50d0f" > nul
if errorlevel 1 (
    echo.
    echo Error: Patched bg3.exe checksum does not match. Reverting changes...
    del bg3.exe
    rename bg3_backup.exe bg3.exe
    del bg3_dx11.exe
    rename bg3_dx11_backup.exe bg3_dx11.exe
    pause
    exit /b 1
)

REM Step 10: Verify patched bg3_dx11.exe MD5 checksum
echo Verifying patched bg3_dx11.exe checksum...
certutil -hashfile bg3_dx11.exe MD5 | find /i "59d8457ea8ae37607bb1bb35e3624bd8" > nul
if errorlevel 1 (
    echo.
    echo Error: Patched bg3_dx11.exe checksum does not match. Reverting changes...
    del bg3.exe
    rename bg3_backup.exe bg3.exe
    del bg3_dx11.exe
    rename bg3_dx11_backup.exe bg3_dx11.exe
    pause
    exit /b 1
)

REM Step 11: Clean up patch files and downloaded zip
echo Cleaning up patch files and downloaded zip...
del patch_bg3.hex
del patch_dx11.hex
del xxd-win64-msvc.zip

REM Step 12: Clean up xxd folder
echo Cleaning up xxd folder...
rmdir /S /Q xxd

echo Done!
pause
Editor is loading...
Leave a Comment