SHARE
TWEET

Untitled

a guest Jan 16th, 2016 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ;Star Wars Battlefront BETA (And Final) Utility Tool
  3. ;By MontagesNmore
  4. ;Began: 1/8/16
  5. ;Stable:  1.0
  6. ;Current: 1.0
  7. ;Finished: Open
  8. ;Any code misuse or redistrubtion without my knoweledge is prohibited!
  9. ;Copyright 2015
  10. ;
  11. ;
  12. ;Let's make some magic below!!!
  13. */
  14. ;####################################################
  15. #Persistent
  16. #NoEnv
  17. #NoTrayIcon
  18. #SingleInstance, Force
  19. SendMode Input
  20. SetWorkingDir %A_ScriptDir%
  21. /*
  22.  
  23. INTENTIONAL SPACE
  24.  
  25. */
  26.  
  27. /*
  28.  
  29. Group Box
  30.  
  31. */
  32. Gui, Add, GroupBox, x10 y0 w210 h150 +Center, RM-Extractor v1.0 By: MontagesNmore
  33. /*
  34.  
  35. Buttons
  36.  
  37. */
  38. Gui, Add, Button, x20 y20 w70 h30, Open Folder
  39. Gui, Add, Button, x20 y60 w70 h30, Extract
  40. Gui, Add, Button, x20 y100 w70 h30, Restore
  41. /*
  42.  
  43. Body
  44.  
  45. */
  46. Gui, Font, s8 w400 Underline, Tahoma
  47. Gui, Add, Text, x100 y20 w60 h20, Instructions:`n`n1. Click on "Open Folder" button.`n2. Extract edited *.ini file`n3. If you want to restore default *.ini files`, press Restore button.
  48. Gui, Font
  49. Gui, Font, s7 w400, Tahoma
  50. Gui, Add, Text, x100 y40 w110 h90, 1. Press "Open Folder" Button.`n2. Press "Extract"`n3. If you want to restore original files`, click on "Restore."`n4. Refer to Read Me
  51. ; Generated using SmartGuiXP Creator mod 4.3.29.0
  52. ; Title Below
  53. Gui, Show, Center w232 h158, Fallout 4
  54. Return
  55. /*
  56. Non Body Coding
  57. */
  58. ButtonOpenFolder:
  59. StringReplace, UserProfile, A_MyDocuments, \Documents
  60. Run, %UserProfile%\Documents\My Games\Fallout4
  61. return
  62. /*
  63. Extraction
  64. */
  65. ButtonExtract:
  66. ;
  67. Extract_Fallout4(A_MyDocuments "\My Games\Fallout4\Fallout4.ini")
  68. Fallout4_Get(_What)
  69. {
  70.     Static Size = 2586, Name = "Fallout4.ini", Extension = "ini", Directory = "C:\Users\MontagesNmore\Desktop\Fallout4"
  71.     , Options = "Size,Name,Extension,Directory"
  72.     ;This function returns the size(in bytes), name, filename, extension or directory of the file stored depending on what you ask for.
  73.     If (InStr("," Options ",", "," _What ","))
  74.         Return %_What%
  75. }
  76.  
  77. Extract_Fallout4(_Filename, _DumpData = 0)
  78. {
  79.    
  80.     ;This function "extracts" the file to the location+name you pass to it.
  81.     Static HasData = 1, Out_Data, Ptr
  82.     Static 1 = "W0dlbmVyYWxdDQpzTGFuZ3VhZ2U9ZW4NCnVHcmlkc1RvTG9hZD01DQp1RXh0ZXJpb3IgQ2VsbCBCdWZmZXI9MzYNCmJEaXNhYmxlQWxsR29yZT0wDQoNCltTY3JlZW5TcGxhdHRlcl0NCmJCbG9vZFNwbGF0dGVyRW5hYmxlZD0xDQoNCltEaXNwbGF5XQ0KaVByZXNlbnRJbnRlcnZhbD0xDQpiRGVmZXJyZWRDb21tYW5kcz0xDQpmU2hhZG93TE9ETWF4U3RhcnRGYWRlPTEwMDAuMA0KZlNwZWN1bGFyTE9ETWF4U3RhcnRGYWRlPTIwMDAuMA0KZkxpZ2h0TE9ETWF4U3RhcnRGYWRlPTM1MDAuMA0KaVNoYWRvd01hcFJlc29sdXRpb25QcmltYXJ5PTIwNDgNCmJBbGxvd1NjcmVlbnNob3Q9MQ0KZk1lc2hMT0RMZXZlbDFGYWRlRGlzdD0zNTAwLjAwMDANCmZNZXNoTE9ETGV2ZWwyRmFkZURpc3Q9MjAwMC4wMDAwDQpmTWVzaExPREZhZGVQZXJjZW50RGVmYXVsdD0xLjIwMDANCmJOdkdvZHJheXNFbmFibGU9MQ0KYkR5bmFtaWNPYmplY3RRdWVyeU1hbmFnZXI9MQ0KYk11bHRpVGhyZWFkZWRBY2N1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hY2thZ2VMaXN0PUZhbGxvdXQ0IC0gR2VvbWV0cnkuY3NnDQpTQ2VsbFJlc291cmNlSW5kZXhGaWxlTGlzdD1GYWxsb3V0NC5jZHgNClNSZXNvdXJjZUFyY2hpdmVNZW1vcnlDYWNoZUxpc3Q9IEZhbGxvdXQ0IC0gTWlzYy5iYTIsIEZhbGxvdXQ0IC0gU2hhZGVycy5iYTIsIEZhbGxvdXQ0IC0gSW50ZXJmYWNlLmJhMiwgRmFsbG91dDQgLSBNYXRlcmlhbHMuYmEyDQoNCltQYXB5cnVzXQ0KZlBvc3RMb2FkVXBkYXRlVGltZU1TPTUwMC4wDQpiRW5hYmxlTG9nZ2luZz0wDQpiRW5hYmxlVHJhY2U9MA0KYkxvYWREZWJ1Z0luZm9ybWF0aW9uPTANCg0KW0xPRF0NCmZMT0RGYWRlT3V0TXVsdE9iamVjdHM9NC41MDAwDQpmTE9ERmFkZU91dE11bHRJdGVtcz0yLjUwMDANCg0KW1BhdGhmaW5kaW5nXQ0KZldhcnBNYXhUaW1lPTQNCmlXYXJwTWF4UGF0aEZhaWx1cmVDb3VudD0zDQpbV2F0ZXJdDQpiUmVmbGVjdExPRE9iamVjdHM9MA0KYlJlZmxlY3RMT0RMYW5kPTANCmJSZWZsZWN0U2t5PTANCmJSZWZsZWN0TE9EVHJlZXM9MA0K"
  83.    
  84.     If (!HasData)
  85.         Return -1
  86.    
  87.     If (!Out_Data){
  88.         Ptr := A_IsUnicode ? "Ptr" : "UInt"
  89.         , VarSetCapacity(TD, 3543 * (A_IsUnicode ? 2 : 1))
  90.        
  91.         Loop, 1
  92.             TD .= %A_Index%, %A_Index% := ""
  93.        
  94.         VarSetCapacity(Out_Data, Bytes := 2586, 0)
  95.         , DllCall("Crypt32.dll\CryptStringToBinary" (A_IsUnicode ? "W" : "A"), Ptr, &TD, "UInt", 0, "UInt", 1, Ptr, &Out_Data, A_IsUnicode ? "UIntP" : "UInt*", Bytes, "Int", 0, "Int", 0, "CDECL Int")
  96.         , TD := ""
  97.     }
  98.    
  99.     IfExist, %_Filename%
  100.         FileDelete, %_Filename%
  101.    
  102.     h := DllCall("CreateFile", Ptr, &_Filename, "Uint", 0x40000000, "Uint", 0, "UInt", 0, "UInt", 4, "Uint", 0, "UInt", 0)
  103.     , DllCall("WriteFile", Ptr, h, Ptr, &Out_Data, "UInt", 2586, "UInt", 0, "UInt", 0)
  104.     , DllCall("CloseHandle", Ptr, h)
  105.    
  106.     If (_DumpData)
  107.         VarSetCapacity(Out_Data, 2586, 0)
  108.         , VarSetCapacity(Out_Data, 0)
  109.         , HasData := 0
  110. }
  111.  
  112. MsgBox,,Success! ,
  113. (
  114. Please change files:
  115. ====================
  116. "Fallout4.ini"
  117.  
  118. To "Ready-Only" before launching Fallout 4!
  119. )
  120. return
  121. ButtonRestore:
  122.  
  123. MsgBox 4,,
  124. (
  125. This will delete "Fallout4.ini"
  126.  
  127. Once you launch Fallout 4 Launcher, the default Fallout4.ini will automatically reload.
  128.  
  129. Press Yes to continue or press No to cancel.
  130. )
  131. ifmsgbox Yes
  132.     FileSetAttrib, -R, %A_MyDocuments%\My Games\Fallout4\Fallout4.ini
  133. FileDelete, %A_MyDocuments%\My Games\Fallout4\Fallout4.ini
  134. return
  135. ifmsgbox No
  136.     return
  137. ;exit
  138. GuiClose:
  139. ExitApp
RAW Paste Data
Pastebin PRO Summer Special!
Get 60% OFF on Pastebin PRO accounts!
Top