Code:
$kernel32 = DllOpen('kernel32.dll')
$pid = Run(@ScriptDir & '\sro_client.exe ' & '0 /4 0 0'); change the '0' after '/4' to change the division, eg: 1=Division 2
$mid = memopen($pid)
;ECSRO
If memread($mid, 0x9F6A70, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F6A70, ReverseHex(FloatToHex(5000)))
;SJSRO
If memread($mid, 0x9F48C0, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F48C0, ReverseHex(FloatToHex(5000)))
;MYSRO/SJSRO
If memread($mid, 0x655934, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x655934, ReverseHex(FloatToHex(5000)))
EndIf
memclose($mid)
DllClose($kernel32)
Func memopen($pid)
Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
Return $mid[0]
EndFunc ;==>memopen
Func memread($mid, $adress, $type = 'dword')
Local $struct = DllStructCreate($type)
DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
Return DllStructGetData($struct, 1)
EndFunc ;==>memread
Func memwrite($mid, $adress, $hex)
Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
For $i = DllStructGetSize($struct) To 1 Step - 1
DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
Next
Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc ;==>memwrite
Func memclose($mid)
DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc ;==>memclose
Func FloatToHex($float)
Local $a = DllCall($kernel32, 'int', 'MulDiv', 'Float', $float, 'int', 1, 'int', 1)
Return Hex($a[0])
EndFunc ;==>FloatToHex
Func ReverseHex($hex)
Local $x
For $i = StringLen($hex) + 1 To 1 Step - 2
$x &= StringMid($hex, $i, 2)
Next
Return $x
EndFunc ;==>ReverseHex
That should do it (btw, yes this is code from lolkop's loader, but seeing as he posts the source to all his apps, i dont see any harm in shortening it to your needs)