Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.11 KB | None | 0 0
  1.     Public Sub OpenClientWithMC(ByVal filename As String)
  2.         Try
  3.             Dim pi As PROCESS_INFORMATION = New PROCESS_INFORMATION
  4.             Dim si As STARTUPINFO = New STARTUPINFO
  5.             CreateProcess(filename, " ", IntPtr.Zero, IntPtr.Zero, False, &H4, IntPtr.Zero, IO.Path.GetDirectoryName(filename), si, pi)
  6.             Dim ahandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, pi.dwProcessId)
  7.             Dim p As Process = Process.GetProcessById(Convert.ToInt32(pi.dwProcessId))
  8.             Dim baseAdress As UInt32 = Convert.ToUInt32(p.MainModule.BaseAddress.ToInt32())
  9.             WriteProcessMemory(ahandle, New IntPtr(_MC - &H400000 + baseAdress), {MultiClientJMP}, 1, Nothing)
  10.             ResumeThread(pi.hThread)
  11.             p.WaitForInputIdle()
  12.             WriteProcessMemory(ahandle, New IntPtr(_MC - &H400000 + baseAdress), {MultiClientJNZ}, 1, Nothing)
  13.             p.EnableRaisingEvents = True
  14.             CloseHandle(ahandle)
  15.             CloseHandle(pi.hProcess)
  16.             CloseHandle(pi.hThread)
  17.         Catch ex As Exception
  18.             MsgBox(ex.Message)
  19.         End Try
  20.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement