Imports System.Runtime.InteropServices
Imports System.Diagnostics
Imports System.IO
Public Class NativeMethods
Private Shared ProcessHandle As IntPtr = IntPtr.Zero
'Native Methods
<DllImport("kernel32.dll", EntryPoint:="OpenProcess", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function OpenP(ByVal DesiredAccess As Integer, ByVal InheritHandle As Boolean, ByVal ProcessID As Integer) As IntPtr
End Function
<DllImport("kernel32.dll", EntryPoint:="CloseHandle", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function CloseH(ByVal Handle As IntPtr) As Boolean
End Function
<DllImport("kernel32.dll", EntryPoint:="WriteProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function WritePM(ByVal ProcessHandle As IntPtr, ByVal Address As IntPtr, ByVal Buffer As Byte(), ByVal Size As System.UInt32, <Out()> ByRef NumberOfBytesWritten As Int32) As Boolean
End Function
'API-Implementation
Private Shared Function OpenP(ByVal OPID As Integer) As Boolean
NativeMethods.ProcessHandle = NativeMethods.OpenP(&H1F0FF, False, OPID)
Return IIf(NativeMethods.ProcessHandle = IntPtr.Zero, False, True)
End Function
Private Shared Function CloseH() As Boolean
If NativeMethods.ProcessHandle = IntPtr.Zero Then Return False
Return NativeMethods.CloseH(NativeMethods.ProcessHandle)
End Function
'WriteProcessMemory
Friend Shared Sub WriteArray(ByVal Address As IntPtr, ByVal Buffer As Byte()) ' CE: Array of Bytes '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
WritePM(ProcessHandle, Address, Buffer, Buffer.Length, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteByte(ByVal Address As IntPtr, ByVal Buffer As Byte) ' CE: 1 Byte '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 1, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteShort(ByVal Address As IntPtr, ByVal Buffer As Short) ' CE: 2 Bytes '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 2, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteInteger(ByVal Address As IntPtr, ByVal Buffer As Integer) ' CE: 4 Bytes '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 4, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteLong(ByVal Address As IntPtr, ByVal Buffer As Long) ' CE: 8 Bytes '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 8, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteSingle(ByVal Address As IntPtr, ByVal Buffer As Single) ' CE: Float '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 4, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteDouble(ByVal Address As IntPtr, ByVal Buffer As Double) ' CE: Double '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = BitConverter.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, 8, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteString(ByVal Address As IntPtr, ByVal Buffer As String) ' CE: String '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = System.Text.Encoding.ASCII.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, Buffer.Length, 0)
NativeMethods.CloseH()
End Sub
Friend Shared Sub WriteUnicodeString(ByVal Address As IntPtr, ByVal Buffer As String) ' CE: Unicode String '
NativeMethods.OpenP(Process.GetProcessesByName("S4 Client")(0).Id)
If ProcessHandle = IntPtr.Zero Then Exit Sub
Dim tBuffer As Byte() = System.Text.Encoding.Unicode.GetBytes(Buffer)
WritePM(ProcessHandle, Address, tBuffer, Buffer.Length * 2, 0)
NativeMethods.CloseH()
End Sub
End Class
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hProcess As Integer) As Integer
Private Declare Function ReadProcessMemory1 Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Single
Private Declare Function ReadProcessMemory2 Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Long, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Long
Private Declare Function ReadProcessMemory3 Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, <Out()> ByVal lpBuffer() As Byte, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Boolean
Public Function ReadFloat(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Single
Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
Dim hProcess As IntPtr = OpenProcess(&H10, 0, MyP(0).Id)
Dim hAddress As Integer
Dim vBuffer As Single
hAddress = Address
ReadProcessMemory1(hProcess, hAddress, vBuffer, nsize, 0)
CloseHandle(hProcess)
Return vBuffer
End Function
Public Function ReadLong(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Long
Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
Dim hProcess As IntPtr = OpenProcess(&H10, 0, MyP(0).Id)
Dim hAddress As Integer
Dim vBuffer As Long
hAddress = Address
ReadProcessMemory2(hProcess, hAddress, vBuffer, nsize, 0)
CloseHandle(hProcess)
Return vBuffer
End Function
Public Function ReadByteArray(ByVal ProcessName As String, ByRef Address As Integer, Optional ByVal nsize As Integer = 4) As Byte()
Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
Dim hProcess As IntPtr = OpenProcess(&H10, 0, MyP(0).Id)
Dim hAddress As Integer
Dim vBuffer(nsize - 1) As Byte
hAddress = Address
ReadProcessMemory3(hProcess, hAddress, vBuffer, nsize, 0)
CloseHandle(hProcess)
Return vBuffer
End Function
End Module
[GAMESCOM-SHOP] Vindictus Code, FireFall BETA Code, McGame.com Code, Victory Ukash 10/18/2012 - elite*gold Trading - 8 Replies Hallo Leute hab ein paar Sachen auf der Gamescom gesammelt und übrig, diese möchte ich hier verkaufen.
Ich akzeptiere nur Paypal, E*gold und Paysafecards!
Hier ist eine Liste mit Bildern (natürlich sind die Codes zensiert :D):
1. Firefall Beta KEY Ihr macht den Preis!
Bild
2. Vindictus Code 50 e*gold
Bild
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU) 08/21/2012 - League of Legends Trading - 1 Replies your "already used in the NA / EU servers is Pax Sivir Code"
Do you have?
Want to exchange "Pax Sivir Code"
I "king Rammus code OR Katarina kitty cat code" will provide
I use this code in the NA / EU servers did not.
just. South Korea on a server, you should not use Pax Sivir Code.
If you are interested in this deal, contact me.
e-mail: [email protected]
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU) 08/20/2012 - League of Legends Trading - 0 Replies Hello Korea is my server users.
I NA / EU servers have already been used in the "Pax Sivir Code" wants
As a reward, "king Rammus code OR Katarina kitty cat code"
I will send you to gift.
Have already used the code,
Feel free to do the exchange!
Please send mail
[email protected]