Need help, I have no experience with pattern scan at all.
I want to read/write values from pattern scan and have no idea how to do it. Can someone be nice and give me a little help. I searched the forum and still can't get it to work or know what to do.
I have this
I want to read/write values from pattern scan and have no idea how to do it. Can someone be nice and give me a little help. I searched the forum and still can't get it to work or know what to do.
I have this
Code:
RECOIL "Paladins.exe" \x77\x00\x8d\x04\x00\xf6\x84\xc7\xfc\x06\x00\x00 x?xx?xxxxxxx
Code:
Func _MemoryScanEx($ah_Handle, $pattern, $mask , $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
If Stringlen($pattern)/2 <> Stringlen($mask) Then
SetError(4)
Return -4
EndIf
Local $formatedpattern=""
Local $BufferPattern
Local $BufferMask
for $i = 0 to stringlen($mask)-1
$BufferPattern = StringLeft($pattern,2)
$pattern = StringRight($pattern,StringLen($pattern)-2)
$BufferMask = StringLeft($mask,1)
$mask = StringRight($mask,StringLen($mask)-1)
if $BufferMask = "?" then $BufferPattern = ".."
$formatedpattern = $formatedpattern&$BufferPattern
Next
$pattern = $formatedpattern
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 ;==>_MemoryScanEx