Advertisement
maat7043

Deobfuscator

Apr 25th, 2014
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 30.37 KB | None | 0 0
  1. Imports System
  2. Imports System.IO
  3. Imports System.Net
  4. Imports System.Text.RegularExpressions
  5. Imports System.Threading
  6. Imports System.Threading.Tasks
  7.  
  8. Public Class Deobfuscator
  9.     ' Initialize Variables
  10.     Dim Folder As String = Application.StartupPath & "/RABCDasm"
  11.     Dim Trillix As String = Application.StartupPath & "/Trillix"
  12.     Dim swfok As Boolean = False
  13.     ' File Selector
  14.     Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
  15.         Dim fd As OpenFileDialog = New OpenFileDialog()
  16.         Dim strFileName As String
  17.         fd.Title = "Open File Dialog"
  18.         fd.InitialDirectory = Application.StartupPath & "/Clients"
  19.         fd.Filter = "Shockwave Flash Objects (*.swf)|*.*"
  20.         fd.FilterIndex = 2
  21.         fd.RestoreDirectory = True
  22.  
  23.         If fd.ShowDialog() = DialogResult.OK Then
  24.             strFileName = fd.FileName
  25.             If InStr(strFileName, ".swf") <> 0 Then
  26.                 TextBox2.Text = strFileName
  27.                 swfok = True
  28.             Else
  29.                 MessageBox.Show("You have to pick a .swf silly...")
  30.             End If
  31.         End If
  32.     End Sub
  33.     ' Remove Junk Code
  34.     Private Sub Deobf(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  35.         If TextBox2.Text = "" Then
  36.             MessageBox.Show("You have to pick a .swf...")
  37.         ElseIf swfok = False Then
  38.             MessageBox.Show("You have to pick a .swf...")
  39.         Else
  40.             ' Change Cursor
  41.             Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
  42.  
  43.             ' Copy over RABCDasm and the swf
  44.             My.Computer.FileSystem.CopyFile(TextBox2.Text, Folder & "\client.swf", True)
  45.  
  46.             ' Decompile the swf
  47.             Decompile()
  48.  
  49.  
  50.             ' Create an Array containing all of the files in the */client-1 directory
  51.             Dim Classes As String() = Directory.GetFiles(Folder, "*.class.asasm", SearchOption.AllDirectories)
  52.             Dim Processed As Integer = 0
  53.             Dim Total As Integer = Classes.Length
  54.             Parallel.For(0, Classes.Length, Sub(i)
  55.                                                 ' Loop Through Every Single file from top to bottom
  56.                                                 ' Create a Streamreader to read through each file
  57.  
  58.                                                 '' Path to current file in loop
  59.                                                 Dim MyFile As String = Classes(i)
  60.  
  61.                                                 '' Create Dummy file to be filed, copied in, and deleted
  62.                                                 Dim NewFile As String = Path.GetDirectoryName(MyFile) & "/Temp" & i & ".class.asasm"
  63.  
  64.                                                 '' Loop Variables
  65.                                                 Dim CurrentLine As String = ""
  66.                                                 Dim LinetoWrite As String = ""
  67.                                                 Dim Count As Integer = 0
  68.  
  69.                                                 '' Deobf Logic Variables
  70.                                                 Dim BoolArray(2) As String
  71.                                                 Dim LocalArray(2) As String
  72.                                                 Dim InCodeBlock As Boolean = False
  73.                                                 Dim TwoSetLocals As Integer = 0
  74.                                                 Dim HitaLocal As Boolean = False
  75.                                                 Dim LocalHit As Integer = 0
  76.                                                 Dim JumpLine As String = "EMPTY"
  77.  
  78.                                                 Dim RndFile As String = Path.GetDirectoryName(MyFile) & "/RndFile" & i & ".class.asasm"
  79.                                                 Dim RndWriter As StreamWriter
  80.                                                 Dim RndJump As Boolean = False
  81.                                                 Dim RndLine As String = "EMPTY"
  82.  
  83.                                                 '' Readerwriter Combo to read and write lines as it goes
  84.  
  85.                                                 '' Loop 1: Check for Random Jumps
  86.                                                 Using sr As StreamReader = New StreamReader(MyFile)
  87.                                                     Using sw As StreamWriter = New StreamWriter(NewFile, False)
  88.                                                         CurrentLine = sr.ReadLine
  89.                                                         Do While (Not CurrentLine Is Nothing)
  90.                                                             LinetoWrite = CurrentLine
  91.  
  92.                                                             If CurrentLine.Contains(" code") Then
  93.                                                                 ' Begining of Code Body
  94.                                                                 If CurrentLine.Contains("tracking") Then
  95.                                                                     sw.WriteLine(LinetoWrite)
  96.  
  97.                                                                 ElseIf Not CurrentLine.Contains("end") Then
  98.                                                                     sw.WriteLine(LinetoWrite)
  99.                                                                     InCodeBlock = True
  100.                                                                     Count = 0
  101.  
  102.                                                                     ' End of Code Block
  103.                                                                 Else
  104.                                                                     InCodeBlock = False
  105.                                                                     If RndJump = True Then
  106.                                                                         RndWriter.Close()
  107.                                                                         sw.WriteLine(File.ReadAllText(RndFile))
  108.                                                                         RndLine = "EMPTY"
  109.                                                                         RndJump = False
  110.                                                                     End If
  111.                                                                     sw.WriteLine(LinetoWrite)
  112.                                                                 End If
  113.  
  114.                                                                 ' Check to See if you are in a code block
  115.                                                             ElseIf InCodeBlock = True Then
  116.                                                                 ' Check to see if you are in a jump segment
  117.                                                                 If RndJump = True Then
  118.                                                                     ' Check to see if your jumpline is hit
  119.                                                                     '' Check first to see if you made it all the way to the jump without hitting another LXX:
  120.                                                                     If CurrentLine.Contains(RndLine) Then
  121.                                                                         RndJump = False
  122.                                                                         RndLine = "EMPTY"
  123.                                                                         RndWriter.Close()
  124.                                                                         sw.WriteLine(LinetoWrite)
  125.  
  126.                                                                         '' Check to see if the jump is not junk
  127.                                                                     ElseIf CurrentLine.Contains(":") Then
  128.                                                                         RndWriter.WriteLine(CurrentLine)
  129.                                                                         RndWriter.Close()
  130.                                                                         sw.WriteLine(File.ReadAllText(RndFile))
  131.                                                                         RndLine = "EMPTY"
  132.                                                                         RndJump = False
  133.  
  134.                                                                         '' Check for sequential real/fake jumps
  135.                                                                     ElseIf CurrentLine.Contains("jump") Then
  136.                                                                         RndWriter.Close()
  137.                                                                         sw.WriteLine(File.ReadAllText(RndFile))
  138.                                                                         RndLine = "L" & CurrentLine.Split("L")(1) & ":"
  139.                                                                         RndWriter = New StreamWriter(RndFile, False)
  140.                                                                         RndWriter.WriteLine(CurrentLine)
  141.                                                                     Else
  142.                                                                         '' If neither continue to fill your streamwriter just in case
  143.                                                                         RndWriter.WriteLine(CurrentLine)
  144.                                                                     End If
  145.  
  146.  
  147.                                                                     ' Check to see if a new jump segment is initiated  
  148.                                                                 ElseIf CurrentLine.Contains("jump") Then
  149.                                                                     RndJump = True
  150.                                                                     RndLine = "L" & CurrentLine.Split("L")(1) & ":"
  151.                                                                     RndWriter = New StreamWriter(RndFile, False)
  152.                                                                     RndWriter.WriteLine(CurrentLine)
  153.  
  154.                                                                     ' Not in a jump Segment or starting a new one
  155.                                                                 Else
  156.                                                                     sw.WriteLine(LinetoWrite)
  157.                                                                 End If
  158.  
  159.                                                             Else
  160.                                                                 ' Write Currentline back if you are not in a code block
  161.                                                                 sw.WriteLine(LinetoWrite)
  162.                                                             End If
  163.  
  164.                                                             Count = Count + 1
  165.                                                             CurrentLine = sr.ReadLine
  166.                                                         Loop
  167.                                                     End Using
  168.                                                 End Using
  169.  
  170.                                                 ' Copy File Back into client-1 Directory
  171.                                                 My.Computer.FileSystem.DeleteFile(MyFile)
  172.                                                 My.Computer.FileSystem.RenameFile(NewFile, Path.GetFileNameWithoutExtension(MyFile) & ".asasm")
  173.  
  174.                                                 Count = 0
  175.  
  176.                                                 '' Loop 2: all other deobfuscation
  177.                                                 Using sr As StreamReader = New StreamReader(MyFile)
  178.                                                     Using sw As StreamWriter = New StreamWriter(NewFile, False)
  179.                                                         CurrentLine = sr.ReadLine
  180.                                                         Do While (Not CurrentLine Is Nothing)
  181.                                                             LinetoWrite = CurrentLine
  182.  
  183.                                                             If CurrentLine.Contains(" code") Then
  184.                                                                 ' Begining of Code Body
  185.                                                                 If CurrentLine.Contains("tracking") Then
  186.                                                                     sw.WriteLine(LinetoWrite)
  187.                                                                 ElseIf Not CurrentLine.Contains("end") Then
  188.                                                                     sw.WriteLine(LinetoWrite)
  189.                                                                     InCodeBlock = True
  190.                                                                     ' Reset Count
  191.                                                                     Count = 0
  192.                                                                     TwoSetLocals = 0
  193.  
  194.                                                                     ' End of Code Block
  195.                                                                 Else
  196.                                                                     InCodeBlock = False
  197.                                                                 End If
  198.                                                             End If
  199.  
  200.                                                             ' Check to See if you are in a code block
  201.                                                             If InCodeBlock = True Then
  202.                                                                 ' Write first two line of each code block to the Boolean Array
  203.                                                                 If Count = 1 Then
  204.                                                                     If Not CurrentLine.Contains("push") Then
  205.                                                                         InCodeBlock = False
  206.                                                                         sw.WriteLine(LinetoWrite)
  207.                                                                     Else
  208.                                                                         BoolArray(0) = CurrentLine
  209.                                                                     End If
  210.  
  211.                                                                 ElseIf Count = 2 Then
  212.                                                                     BoolArray(1) = CurrentLine
  213.  
  214.                                                                 ElseIf Not TwoSetLocals = 2 Then
  215.                                                                     ' Check for a swap
  216.                                                                     If CurrentLine.Contains("swap") Then
  217.                                                                         Dim Temp As String = BoolArray(0)
  218.                                                                         BoolArray(0) = BoolArray(1)
  219.                                                                         BoolArray(1) = Temp
  220.                                                                     End If
  221.                                                                     ' Write first two set locals to an array
  222.                                                                     If CurrentLine.Contains("set") Then
  223.                                                                         TwoSetLocals = TwoSetLocals + 1
  224.                                                                         LocalArray(TwoSetLocals - 1) = CurrentLine.Replace("set", "get")
  225.                                                                     End If
  226.  
  227.                                                                 ElseIf HitaLocal = True Then
  228.                                                                     ' Check to see if its an iffalse jump
  229.                                                                     If CurrentLine.Contains("iffalse") Then
  230.                                                                         ' Check for a match
  231.                                                                         If BoolArray(LocalHit).Contains("false") Then
  232.                                                                             CurrentLine.Replace("false", "")
  233.                                                                             JumpLine = "L" & CurrentLine.Split("L")(1) & ":"
  234.                                                                         Else
  235.                                                                             JumpLine = "L" & CurrentLine.Split("L")(1) & ":"
  236.                                                                             HitaLocal = False
  237.                                                                         End If
  238.                                                                     End If
  239.                                                                     ' Check to see if its an iffalse jump
  240.                                                                     If CurrentLine.Contains("iftrue") Then
  241.                                                                         ' Check for a match
  242.                                                                         If BoolArray(LocalHit).Contains("true") Then
  243.                                                                             JumpLine = "L" & CurrentLine.Split("L")(1) & ":"
  244.                                                                         Else
  245.                                                                             JumpLine = "L" & CurrentLine.Split("L")(1) & ":"
  246.                                                                             HitaLocal = False
  247.                                                                         End If
  248.                                                                     End If
  249.  
  250.                                                                     'Check to see if first register is checked against
  251.                                                                 ElseIf CurrentLine.Contains(LocalArray(0)) Then
  252.                                                                     HitaLocal = True
  253.                                                                     LocalHit = 1
  254.  
  255.                                                                     ' Check to see if Second Register is checked against
  256.                                                                 ElseIf CurrentLine.Contains(LocalArray(1)) Then
  257.                                                                     HitaLocal = True
  258.                                                                     LocalHit = 0
  259.  
  260.                                                                     ' Check for label from past if*** check
  261.                                                                 ElseIf CurrentLine.Contains(JumpLine) Then
  262.                                                                     HitaLocal = False
  263.                                                                     sw.WriteLine(LinetoWrite)
  264.  
  265.                                                                     ' Write Good Code
  266.                                                                 Else
  267.                                                                     sw.WriteLine(LinetoWrite)
  268.                                                                 End If
  269.  
  270.                                                             Else
  271.                                                                 ' Write Currentline back if you are not in a code block
  272.                                                                 sw.WriteLine(LinetoWrite)
  273.                                                             End If
  274.  
  275.                                                             Count = Count + 1
  276.                                                             CurrentLine = sr.ReadLine
  277.                                                         Loop
  278.                                                     End Using
  279.                                                 End Using
  280.                                                 ' Copy File Back into client-1 Directory
  281.                                                 My.Computer.FileSystem.DeleteFile(MyFile)
  282.                                                 My.Computer.FileSystem.RenameFile(NewFile, Path.GetFileNameWithoutExtension(MyFile) & ".asasm")
  283.                                                 Processed = Processed + 1
  284.                                                 Try
  285.                                                     Label1.Text = Processed & " of " & Total & "Files"
  286.                                                     Application.DoEvents()
  287.                                                 Catch
  288.                                                 End Try
  289.  
  290.                                             End Sub)
  291.         End If
  292.  
  293.         ' Recompile
  294.         Recompile()
  295.  
  296.         ' Remove old client-1
  297.         Label1.Text = "Cleaning up files..."
  298.         Application.DoEvents()
  299.  
  300.         My.Computer.FileSystem.DeleteDirectory(Folder & "/client-1", FileIO.DeleteDirectoryOption.DeleteAllContents)
  301.         My.Computer.FileSystem.DeleteDirectory(Folder & "/client-0", FileIO.DeleteDirectoryOption.DeleteAllContents)
  302.         My.Computer.FileSystem.DeleteFile(Folder & "/client-0.abc")
  303.         My.Computer.FileSystem.DeleteFile(Folder & "/client-1.abc")
  304.  
  305.         ' Decompile Again
  306.         Decompile()
  307.  
  308.         ' Moving Files
  309.         Label1.Text = "Cleaning up files..."
  310.         Application.DoEvents()
  311.         My.Computer.FileSystem.MoveDirectory(Folder & "/client-1", Application.StartupPath & "/Deobf/client-1", True)
  312.         My.Computer.FileSystem.MoveDirectory(Folder & "/client-0", Application.StartupPath & "/Deobf/client-0", True)
  313.         My.Computer.FileSystem.MoveFile(Folder & "/client.swf", Application.StartupPath & "/Deobf/client.swf", True)
  314.         My.Computer.FileSystem.DeleteFile(Folder & "/client-0.abc")
  315.         My.Computer.FileSystem.DeleteFile(Folder & "/client-1.abc")
  316.  
  317.         ' Change Cursor
  318.         Label1.Text = ""
  319.         Application.DoEvents()
  320.         Me.Cursor = System.Windows.Forms.Cursors.Default
  321.  
  322.         ' Finished!
  323.         MessageBox.Show("Finished Deobfuscation Process!")
  324.  
  325.     End Sub
  326.     ' Decompile
  327.     Private Sub Decompile()
  328.         Me.Activate()
  329.         Label1.Text = "Decompiling Client..."
  330.         Application.DoEvents()
  331.  
  332.         Dim FILE_NAME As String = Folder & "\decompile.bat"
  333.         Dim aryText(5) As String
  334.         aryText(0) = "cd " & Folder
  335.         aryText(1) = "swfdecompress client.swf"
  336.         aryText(2) = "abcexport client.swf"
  337.         aryText(3) = "rabcdasm client-1.abc"
  338.         aryText(4) = "rabcdasm client-0.abc"
  339.         Create_Batch(aryText, FILE_NAME)
  340.     End Sub
  341.     ' Recompile SWF
  342.     Private Sub Recompile()
  343.         Me.Activate()
  344.         Label1.Text = "Recompiling Client..."
  345.         Application.DoEvents()
  346.  
  347.         Dim FILE_NAME As String = Folder & "\recompile.bat"
  348.         Dim aryText(5) As String
  349.         aryText(0) = "cd " & Folder
  350.         aryText(1) = "rabcasm client-1\client-1.main.asasm"
  351.         aryText(2) = "abcreplace client.swf 1 client-1\client-1.main.abc"
  352.         aryText(3) = "rabcasm client-0\client-0.main.asasm"
  353.         aryText(4) = "abcreplace client.swf 0 client-0\client-0.main.abc"
  354.         Create_Batch(aryText, FILE_NAME)
  355.     End Sub
  356.     ' Create And Run Batch Files
  357.     Public Sub Create_Batch(aryText() As String, FileName As String)
  358.         Dim objWriter As New System.IO.StreamWriter(FileName, False)
  359.         For i = 0 To aryText.Length - 1
  360.             objWriter.WriteLine(aryText(i))
  361.         Next
  362.         objWriter.Close()
  363.  
  364.         Dim Process As New Process
  365.         Dim ps As New ProcessStartInfo(FileName)
  366.         ps.RedirectStandardError = True
  367.         ps.RedirectStandardOutput = True
  368.         ps.CreateNoWindow = True
  369.         ps.WindowStyle = ProcessWindowStyle.Hidden
  370.         ps.UseShellExecute = False
  371.         Process.StartInfo = ps
  372.         Process.Start()
  373.         Process.WaitForExit()
  374.     End Sub
  375.     ' Flex Renamer
  376.     Private Sub Renamer(sender As System.Object, e As System.EventArgs) Handles Button3.Click
  377.         ' Change Cursor
  378.         Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
  379.  
  380.         ' Delete old Trillix Directory
  381.         If My.Computer.FileSystem.DirectoryExists(Trillix) Then
  382.             My.Computer.FileSystem.DeleteDirectory(Trillix, FileIO.DeleteDirectoryOption.DeleteAllContents)
  383.         End If
  384.         If My.Computer.FileSystem.DirectoryExists(Application.StartupPath & "/Temp") Then
  385.             My.Computer.FileSystem.DeleteDirectory(Application.StartupPath & "/Temp", FileIO.DeleteDirectoryOption.DeleteAllContents)
  386.         End If
  387.  
  388.         ' Move Project to Trillix Folder
  389.         My.Computer.FileSystem.CopyDirectory(TextBox1.Text, Trillix, True)
  390.  
  391.         Dim FileChange As String() = Directory.GetFiles(Trillix, "*.*", SearchOption.AllDirectories)
  392.  
  393.         ' Rename Class Files
  394.         For i = 0 To FileChange.Length - 1
  395.             Dim Tempname As String
  396.             Tempname = FileChange(i).Replace("Trillix", "Temp").Replace("_-", "_").Replace("-", "_").Replace("bin_debug", "bin-debug")
  397.             Tempname = Tempname.Replace("\ try", "\_try").Replace("\try ", "\try_").Replace("\try", "\_try_")
  398.             My.Computer.FileSystem.MoveFile(FileChange(i), Tempname, True)
  399.         Next
  400.  
  401.         Dim All As String() = Directory.GetFiles(Application.StartupPath & "/Temp", "*.as", SearchOption.AllDirectories)
  402.  
  403.         '' Loop 0: Fix Scripts and client-1.main
  404.         For i = 0 To All.Length - 1
  405.             Dim NewFile As String = Application.StartupPath & "/Temp/Temp.class.asasm"
  406.             Dim CurrentLine As String = ""
  407.             Dim LinetoWrite As String = ""
  408.             Dim Count As Integer = 0
  409.  
  410.             Using sr As StreamReader = New StreamReader(All(i))
  411.                 Using sw As StreamWriter = New StreamWriter(NewFile, False)
  412.                     CurrentLine = sr.ReadLine
  413.                     Do While (Not CurrentLine Is Nothing)
  414.                         LinetoWrite = CurrentLine
  415.                         ' Fix Case for _--
  416.                         CurrentLine = CurrentLine.Replace("_--", "++++")
  417.  
  418.                         'Define Regex Cases
  419.                         ' _-$-
  420.                         Dim case1 As Regex = New Regex("_-[^\s]-")
  421.                         ' _-$$-
  422.                         Dim case2 As Regex = New Regex("_-[^\s][^\s]-")
  423.                         ' _-$$$-
  424.                         Dim case3 As Regex = New Regex("_-[^\s][^\s][^\s]-")
  425.                         ' _-$
  426.                         Dim case4 As Regex = New Regex("_-[^\s]")
  427.  
  428.                         Dim Check As Boolean = False
  429.                         Dim Match As Match
  430.  
  431.                         ' Check Case 1
  432.                         Do While Check = False
  433.                             Match = case1.Match(CurrentLine)
  434.                             If Match.Success = True Then
  435.                                 CurrentLine = CurrentLine.Replace(Match.Value, Match.Value.Replace("_-", "_").Replace("-", "_"))
  436.                             Else
  437.                                 Check = True
  438.                             End If
  439.                         Loop
  440.  
  441.                         ' Check Case 2
  442.                         Check = False
  443.                         Do While Check = False
  444.                             Match = case2.Match(CurrentLine)
  445.                             If Match.Success = True Then
  446.                                 CurrentLine = CurrentLine.Replace(Match.Value, Match.Value.Replace("_-", "_").Replace("-", "_"))
  447.                             Else
  448.                                 Check = True
  449.                             End If
  450.                         Loop
  451.  
  452.                         ' Check Case 3
  453.                         Check = False
  454.                         Do While Check = False
  455.                             Match = case3.Match(CurrentLine)
  456.                             If Match.Success = True Then
  457.                                 CurrentLine = CurrentLine.Replace(Match.Value, Match.Value.Replace("_-", "_").Replace("-", "_"))
  458.                             Else
  459.                                 Check = True
  460.                             End If
  461.                         Loop
  462.                         ' Check Case 4
  463.                         Check = False
  464.                         Do While Check = False
  465.                             Match = case4.Match(CurrentLine)
  466.                             If Match.Success = True Then
  467.                                 CurrentLine = CurrentLine.Replace(Match.Value, Match.Value.Replace("_-", "_"))
  468.                             Else
  469.                                 Check = True
  470.                             End If
  471.                         Loop
  472.  
  473.  
  474.  
  475.                         LinetoWrite = CurrentLine
  476.  
  477.                         ' Write Currentline back in
  478.                         sw.WriteLine(LinetoWrite)
  479.  
  480.                         Count = Count + 1
  481.                         CurrentLine = sr.ReadLine
  482.                     Loop
  483.                 End Using
  484.             End Using
  485.  
  486.             ' Copy File Back into client-1 Directory
  487.             My.Computer.FileSystem.CopyFile(NewFile, All(i), True)
  488.         Next
  489.  
  490.         ' Delete Move Temp Back to Trillix
  491.         My.Computer.FileSystem.DeleteDirectory(Trillix, FileIO.DeleteDirectoryOption.DeleteAllContents)
  492.         My.Computer.FileSystem.RenameDirectory(Application.StartupPath & "/Temp", "Trillix")
  493.  
  494.         ' Change Cursor
  495.         Me.Cursor = System.Windows.Forms.Cursors.Default
  496.  
  497.         ' Finished!
  498.         MessageBox.Show("Finished Renaming Process!")
  499.     End Sub
  500.     ' Open Folder Dialog
  501.     Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
  502.         Dim fd As FolderBrowserDialog = New FolderBrowserDialog()
  503.         If (fd.ShowDialog() = DialogResult.OK) Then
  504.             TextBox1.Text = fd.SelectedPath
  505.         End If
  506.     End Sub
  507.     ' Load Event
  508.     Private Sub Deobfuscator_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  509.         Label1.Text = ""
  510.     End Sub
  511.     ' Get Newest Client
  512.     Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
  513.         Using wc As New WebClient()
  514.             Dim version = wc.DownloadString("http://www.realmofthemadgod.com/version.txt")
  515.             Dim swf = "http://www.realmofthemadgod.com/AssembleeGameClient" + version + ".swf"
  516.             wc.DownloadFile(swf, Application.StartupPath & "\Clients\Fresh_Client_" & version & ".swf")
  517.             TextBox2.Text = Application.StartupPath & "\Clients\Fresh_Client_" & version & ".swf"
  518.         End Using
  519.     End Sub
  520. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement