While true
$P = _GetProcAddress("kernel32.dll", "ptr", "K32EnumProcesses")
_Soul_WriteProcessMemory ("S4Client.exe",$P,"-1879044926","dword")
_Soul_WriteProcessMemory("S4Client.exe", 0x40400000 + 212BF4, "X6va20","char[7]"); Driver (XTrapVa.dll+212BF4)
wend
;Funcs
Func _GetProcAddress ($Dll,$Type,$function)
local $returntype
$dllcall = DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $dll)
$address = DllCall($dll, $Type, "GetProcAddress", $Type, $dllcall[0], "str", $function)
Return $address[$returntype]
endfunc
Func _Soul_WriteProcessMemory ($hprocess,$Addy,$Val,$type = "dword")
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(1, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 0x1F0FFF, "int", 0, "DWORD", ProcessExists($hprocess))
If @error Then Return SetError(2, "", False)
local $n_TypVa = DllStructCreate($type)
If @error Then Return SetError(3, "", False)
DllStructSetData($n_TypVa, 1, $Val)
If @error Then Return SetError(4, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $Addy, "ptr", DllStructGetPtr($n_TypVa), "int", DllStructGetSize($n_TypVa), "int", 0)
If @error Then Return SetError(5, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
If @error Then Return SetError(6, "", False)
DllClose($kernel32)
If @error Then Return SetError(7, "", False)
Return SetError(0, "", True)
EndFunc