Code:
;==================================================================================
; Function: _MemoryScan($ah_Handle, $pattern [, $after[, $iv_addrStart, [$iv_addrEnd]]])
; Description: Finds the address of the first occurance of a pattern in a process.
; Parameter(s): $ah_Handle - An array containing the Dll handle and the handle
; of the open process as returned by _MemoryOpen().
; $pattern - The pattern you want to find. Provide the pattern
; as a String of hex values. You may use the '.' as wildcard.
; Any other character as '0123456789ABCDEFabcdef.' is ignored.
; Example: "55 8B .. 83"
; $after - (optional) Set to FALSE by default.
; If set to TRUE, the method will return the address
; after the pattern, else the method returns the address
; of the pattern itself.
; $iv_addrStart - (optional) Set to 0x00400000 by default.
; This is the address where the method begins to scan
; for the pattern. It must be in hex format (0x00000000).
; $iv_addrEnd - (optional) Set to 0X00FFFFFF by default.
; This is the address where the method stops to scan
; for the pattern. It must be in hex format (0x00000000).
; Requirement(s): None.
; Return Value(s): On Success - Returns the address of the first occurance of the pattern
; ($after = FALSE) or the address after the first occurance
; of the pattern ($after = TRUE). The address is in
; hexadecimal format.
; On Failure - Returns -1
; @Error - 0 = No error.
; 1 = Invalid $ah_Handle.
; 2 = Invalid $pattern.
; Author(s): Luzifer42
; Note(s): The default scan range will be completed in less than one second.
;==================================================================================
Func _MemoryScan($ah_Handle, $pattern, $after=false, $iv_addrStart=0x00400000, $iv_addrEnd=0X00FFFFFF, $step=51200)
If Not IsArray($ah_Handle) Then
SetError(1)
Return -1
EndIf
$pattern=StringRegExpReplace($pattern, "[^0123456789ABCDEFabcdef.]", "")
IF StringLen($pattern)=0 Then
SetError(2)
Return -2
EndIf
For $addr=$iv_addrStart To $iv_addrEnd Step $step-(StringLen($pattern)/2)
StringRegExp(_MemoryRead($addr, $ah_Handle, "byte[" & $step & "]"), $pattern, 1, 2)
If Not @Error Then
If $after Then
return StringFormat("0x%.8X", $addr+((@Extended-2)/2))
Else
return StringFormat("0x%.8X", $addr+((@Extended-StringLen($pattern)-2)/2))
EndIf
EndIf
Next
Return -3
EndFunc
Bitte.
EDIT: Wann hast du mich mal angeschrieben? O.o