@echo off
rem DVDFab Player 5.x Ultra Offline Activator (by xanax)
rem Activator Release Date: 2019-05-16

NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
setlocal & pushd .

::remove if exist previous registration data from config.ini and leave intact other configuration settings
findstr /v "PC_UserName PC_Password" "%AppData%\DVDFab Player 5\config.ini" > "%AppData%\DVDFab Player 5\config.tmp"
del "%AppData%\DVDFab Player 5\config.ini"
ren "%AppData%\DVDFab Player 5\config.tmp" config.ini

ren "%AppData%\DVDFab Player 5\regRecord\localuse.rec" localuse.rec.bak
if not exist "%AppData%\DVDFab Player 5\regRecord" mkdir "%AppData%\DVDFab Player 5\regRecord"

::extract and decode registration file
echo -----BEGIN CERTIFICATE----->"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo UEsDBBQACQAIAL10H01yO+XplAAAAK4AAAAMAAAAbG9jYWx1c2UueG1sI6tDWrDT>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo lltsZkfGove7mZqd2gDqOWRixOTOh8VblgLKDawe6MsXlFje7qeAs2VmTFaGI7gK>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo BDLSbS6QI6BljyPG8vemCeyO1hjXmocnL12fgP68iKnnrpCKaLp+w0GM7qwb+GSM>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo t66CpcPyNmY1Lf08V06dUbResjtFXs4rVNwcl4H4xDuGr7SN5HnpHHS0MwL+p1BL>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo BwhyO+XplAAAAK4AAABQSwECHwAUAAkACAC9dB9Ncjvl6ZQAAACuAAAADAAkAAAA>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo AAAAACAAAAAAAAAAbG9jYWx1c2UueG1sCgAgAAAAAAABABgAEfGNcidB1AER8Y1y>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo J0HUAR9iGB85uPkBUEsFBgAAAAABAAEAXgAAAM4AAAAAAA==>>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
echo -----END CERTIFICATE----->>"%AppData%\DVDFab Player 5\regRecord\localuse.tmp"
certutil -decode "%AppData%\DVDFab Player 5\regRecord\localuse.tmp" "%AppData%\DVDFab Player 5\regRecord\localuse.rec"
del /q "%AppData%\DVDFab Player 5\regRecord\localuse.tmp" /f
attrib +r "%AppData%\DVDFab Player 5\regRecord\localuse.rec"
cls
echo *******************************************************************
echo *            DVDFab Player 5.x Ultra Offline Activator            *
echo *                            by xanax                             *
echo *                    Release Date: 2019-05-16                     *
echo *******************************************************************
echo.


set /p name="Register DVDFab Player 5 Ultra with your name: "
echo.
if not exist "%SYSTEMDRIVE%\Program Files (x86)" goto win32
if exist "%SYSTEMDRIVE%\Program Files (x86)" goto win64
:win32
reg add "HKLM\SOFTWARE\DVDFab Player 5\RegInfo\Username" /v key /t REG_SZ /d "%name%" /f >nul
reg add "HKLM\SOFTWARE\DVDFab Player 5\RegInfo\Password" /v key /t REG_SZ /d ae8d9d368844f0a972ba89916b3fc709 /f
goto end
:win64
reg add "HKLM\SOFTWARE\WOW6432Node\DVDFab Player 5\RegInfo\Username" /v key /t REG_SZ /d "%name%" /f >nul
reg add "HKLM\SOFTWARE\WOW6432Node\DVDFab Player 5\RegInfo\Password" /v key /t REG_SZ /d ae8d9d368844f0a972ba89916b3fc709 /f
goto end
:end
cls
echo DVDFab Player 5 Ultra is now registered.
echo.
pause
