Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub OpenClientWithMC(ByVal filename As String)
- Try
- Dim pi As PROCESS_INFORMATION = New PROCESS_INFORMATION
- Dim si As STARTUPINFO = New STARTUPINFO
- CreateProcess(filename, " ", IntPtr.Zero, IntPtr.Zero, False, &H4, IntPtr.Zero, IO.Path.GetDirectoryName(filename), si, pi)
- Dim ahandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, pi.dwProcessId)
- Dim p As Process = Process.GetProcessById(Convert.ToInt32(pi.dwProcessId))
- Dim baseAdress As UInt32 = Convert.ToUInt32(p.MainModule.BaseAddress.ToInt32())
- WriteProcessMemory(ahandle, New IntPtr(_MC - &H400000 + baseAdress), {MultiClientJMP}, 1, Nothing)
- ResumeThread(pi.hThread)
- p.WaitForInputIdle()
- WriteProcessMemory(ahandle, New IntPtr(_MC - &H400000 + baseAdress), {MultiClientJNZ}, 1, Nothing)
- p.EnableRaisingEvents = True
- CloseHandle(ahandle)
- CloseHandle(pi.hProcess)
- CloseHandle(pi.hThread)
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement