Home of Gamehacking - Archiv

Normale Version: Problem Applying Aobscan
Sie sehen gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2 3
Well my original bytes are
8B 9F 98 1B 00 00 D9 E8 33 F6

from my code injection i have these bytes

C7 87 98 1B 00 00 F4 01 00 00 8B 9F 98 1B 00 00 C3

so i tried this

Visual Basic Code
 If GetAsyncKeyState(Keys.NumPad1) = &HFFFF8001 Then
            Dim cave As Integer = Allocmem()
            Dim firstscan As Int32

            firstscan = AOBSCAN("Brink", "brink", New Byte() {&H8B, &H9F, &H98, &H1B, &H0, &H0, &HD9, &HE8, &H33, &HF6})

            If Not firstscan = 0 Then
                WriteASM(cave, New Byte() {&HC7, &H87, &H98, &H1B, &H0, &H0, &HF4, &H1, &H0, &H0, &H8B, &H9F, &H98, &H1B, &H0, &H0, &HC3})
                WriteByte(cave + &H630, firstscan)
                AllocJump(firstscan, cave + &H9999, 1)
            End If
            sapi.speak("Activated")
        End If




To understand better here is some of the modules
For WriteAsm

Visual Basic Code
Public Sub WriteASM(ByVal address As Int32, ByVal Value As Byte()) 'Writes assembly using bytes
        For i As Integer = LBound(Value) To UBound(Value)
            WriteByte(address + i, Value(i))
        Next

   End Sub

For WriteByte

Visual Basic Code
Public Sub WriteByte(ByVal address As Integer, ByVal Value As Byte) 'Writes a single byte value
        WriteProcessMemory(pHandle, address, Value, 1, 0)
    End Sub


For Aobscan

Visual Basic Code
 Public Function AOBSCAN(ByVal GameName As String, ByVal ModuleName As String, ByVal Signature As Byte()) As Integer 'Searches for a byte pattern and returns the starting address of it
        'To use this, use it like this: Address = AOBSCAN("gamename", "gamename.exe", New Byte () {Bytes go here})
        Dim BaseAddress, EndAddress As Int32
        For Each PM As ProcessModule In Process.GetProcessesByName(GameName)(0).Modules
            If ModuleName = PM.ModuleName Then
                BaseAddress = PM.BaseAddress
                EndAddress = BaseAddress + PM.ModuleMemorySize
            End If
        Next
        Dim curAddr As Int32 = BaseAddress
        Do
            For i As Integer = 0 To Signature.Length - 1
                If Read_Byte(curAddr + i) = Signature(i) Then
                    If i = Signature.Length - 1 Then
                        Return curAddr
                    End If
                    Continue For
                End If
                Exit For
            Next
            curAddr += 1
        Loop While curAddr < EndAddress
        Return 0
    End Function


For AllocJump

Visual Basic Code
Public Function AllocJump(ByVal source As Int32, ByVal destination As Int32, Optional ByVal Nops As Integer = 0) As Boolean 'Creates a jump from the specified address to a destination address
        WriteByte(source, &HE8)
        WriteInt32(source + 1, destination - source - 5)
        If Nops = 0 Then
            Return 0
        End If
        For i As Int32 = 1 To Nops
            WriteByte(source + 4 + i, &H90)
        Next
        Return 0
    End Function

Could someone who knows how to use vb tell me please i am begging you i want to release my first trainer

Thanks
MarkG

EDIT
Please use [ code=VB] your code here [ /code]
without the spaces, it is easier to read/understand

giassamarkos schrieb:Could someone who knows how to use vb tell me please i am begging you i want to release my first trainer

So, and what's happening?
it doesnt want to be applied
AOBScan isn't somethine you can apply ...
in your case, the firstscan is holding the address, where you bytesignature starts
yes i know
as i said
8B 9F 98 1B 00 00 D9 E8 33 F6 orig

the code injection

C7 87 98 1B 00 00 F4 01 00 00 8B 9F 98 1B 00 00 C3
and as you saw i did the scan but it sstill the health of my player in the game brink still looses health
o yeah and the starting address is the one that i want to hack
change

Visual Basic Code
If GetAsyncKeyState(Keys.NumPad1) = &HFFFF8001 Then
            Dim cave As Integer = Allocmem()
            Dim firstscan As Int32
 
            firstscan = AOBSCAN("Brink", "brink", New Byte() {&H8B, &H9F, &H98, &H1B, &H0, &H0, &HD9, &HE8, &H33, &HF6})
 
            If Not firstscan = 0 Then
                WriteASM(cave, New Byte() {&HC7, &H87, &H98, &H1B, &H0, &H0, &HF4, &H1, &H0, &H0, &H8B, &H9F, &H98, &H1B, &H0, &H0, &HC3})
                WriteByte(cave + &H630, firstscan)
                AllocJump(firstscan, cave + &H9999, 1)
            End If
            sapi.speak("Activated")
        End If

to

Visual Basic Code
If GetAsyncKeyState(Keys.NumPad1) = &HFFFF8001 Then
            Dim cave As Integer = Allocmem()
            Dim firstscan As Int32
 
            firstscan = AOBSCAN("Brink", "brink", New Byte() {&H8B, &H9F, &H98, &H1B, &H0, &H0, &HD9, &HE8, &H33, &HF6})
 
            If Not firstscan = 0 Then
                WriteASM(cave, New Byte() {&HC7, &H87, &H98, &H1B, &H0, &H0, &HF4, &H1, &H0, &H0, &H8B, &H9F, &H98, &H1B, &H0, &H0, &HC3})
                WriteByte(cave + &H630, firstscan)
                AllocJump(firstscan, cave , 5)
                AllocJump(cave+17 ,firstscan+5 ,0)
            End If
            sapi.speak("Activated")
        End If



And change

Visual Basic Code
Public Function AllocJump(ByVal source As Int32, ByVal destination As Int32, Optional ByVal Nops As Integer = 0) As Boolean 'Creates a jump from the specified address to a destination address
        WriteByte(source, &HE8)
        WriteInt32(source + 1, destination - source - 5)
        If Nops = 0 Then
            Return 0
        End If
        For i As Int32 = 1 To Nops
            WriteByte(source + 4 + i, &H90)
        Next
        Return 0
    End Function


to

Visual Basic Code
Public Function AllocJump(ByVal source As Int32, ByVal destination As Int32, Optional ByVal Nops As Integer = 0) As Boolean 'Creates a jump from the specified address to a destination address
        WriteByte(source, &HE9)
        WriteInt32(source + 1, destination - source - 5)
        If Nops = 0 Then
            Return 0
        End If
        For i As Int32 = 1 To Nops
            WriteByte(source + 4 + i, &H90)
        Next
        Return 0
    End Function


Why do you have this one?

Visual Basic Code
WriteByte(cave + &H630, firstscan)

look basically the module name in the cheat engine is gamex86.dll

so in the aobscan i have to change the second one

Visual Basic Code
AOBSCAN("Brink","gamex86",New Bytes () {xxxxxxxxxxxxxxxxxx})

no luck pff every time i am trying to do smthing it is f***** up
OK do you know how to put module addresses in the trainer so i dont have to use aobscan just to put

in the

Visual Basic Code
allocjump("gamex86.dll" + &H56541,cave , 1)

Ok, didn't know that the module name is gamex86.dll ...

Then you have to write it like this

Visual Basic Code
Dim startaddress as Int32 = AOBSCAN("Brink","gamex86.dll",New Bytes () {xxxxxxxxxxxxxxxxxx})


Or you can use the following codesnippet to get the ModuleBase

Visual Basic Code
    Public Function GetModuleBase(ByVal ProcName As String, ByVal ModuleName As String)
        Dim BaseAddress As Int32
        For Each PM As ProcessModule In Process.GetProcessesByName(ProcName)(0).Modules
            If ModuleName = PM.ModuleName Then
                BaseAddress = PM.BaseAddress
            End If
        Next
        Return BaseAddress
    End Function


Call it like

Visual Basic Code
Dim gamex86 as Int32 = GetModuleBase("Brink","gamex86.dll")


With this you'll get the startaddress of the gamex86.dll and then you can just add
the Offset.

Seiten: 1 2 3