coding with autoit

10/03/2017 22:15 coolasf2re#1
i got a problem with overwriting memory.


_MemoryWrite(0x5AFD16,$OPEN,"9090","byte")

this is the line i don't really understand.
what should i put in the space where 9090 stands? 9090 should be the bytes i have to change, and byte is the valuetype. why won't it work?

sry for my bad english xd
10/04/2017 06:02 0x404#2
Quote:
Originally Posted by coolasf2re View Post
i got a problem with overwriting memory.


_MemoryWrite(0x5AFD16,$OPEN,"9090","byte")

this is the line i don't really understand.
what should i put in the space where 9090 stands? 9090 should be the bytes i have to change, and byte is the valuetype. why won't it work?

sry for my bad english xd
:confused: what is this?

FUNC _YourFunction()
$IPID = PROCESSEXISTS("S4Client.exe")
$MEMOPEN = _MEMORYOPEN($IPID)
$SMODULE = "S4Client.exe"
$IOFFSET = 0x5AFD16
$BASEADDR = _MEMORYMODULEGETBASEADDRESS($IPID, $SMODULE) + $IOFFSET
_MEMORYWRITE($BASEADDR, $MEMOPEN, "9090", "byte")
_MEMORYCLOSE($MEMOPEN)
ENDFUNC

might helps you (i use 'long' instead of bytes so not ested but should work)
10/04/2017 13:31 coolasf2re#3
Quote:
Originally Posted by 01001101 0100010 View Post
:confused: what is this?

FUNC _YourFunction()
$IPID = PROCESSEXISTS("S4Client.exe")
$MEMOPEN = _MEMORYOPEN($IPID)
$SMODULE = "S4Client.exe"
$IOFFSET = 0x5AFD16
$BASEADDR = _MEMORYMODULEGETBASEADDRESS($IPID, $SMODULE) + $IOFFSET
_MEMORYWRITE($BASEADDR, $MEMOPEN, "9090", "byte")
_MEMORYCLOSE($MEMOPEN)
ENDFUNC

might helps you (i use 'long' instead of bytes so not ested but should work)
this is my full function

Hack();
GUISetState(@SW_HIDE);
ToolTip("Start S4 League!",0,0);
$WAIT = ProcessWait("S4Client.exe");
$PID = ProcessExists("S4Client.exe");
Sleep(500);
$OPEN = _MemoryOpen ($PID);
If GUICtrlRead($Checkbox1) = 1 Then
_MemoryWrite(0x5AFD16,$OPEN,"9090","byte[4]");
EndIf
10/06/2017 11:54 0x404#4
Quote:
Originally Posted by coolasf2re View Post
this is my full function

Hack();
GUISetState(@SW_HIDE);
ToolTip("Start S4 League!",0,0);
$WAIT = ProcessWait("S4Client.exe");
$PID = ProcessExists("S4Client.exe");
Sleep(500);
$OPEN = _MemoryOpen ($PID);
If GUICtrlRead($Checkbox1) = 1 Then
_MemoryWrite(0x5AFD16,$OPEN,"9090","byte[4]");
EndIf

_MemoryWrite(0x5AFD16,$OPEN,"9090","byte[4]");

wont work at all try to convert the offset from hex to dez (u can use windows calculator and set to programmers. your offset 5AFD16 - in dez = 5963030

so it should look likt this

WRITEPROCESSMEMORY(PROCESSEXISTS($PROCESS), $S4CLIENT + 5963030, "0x9090", "byte[2]") byte is 2 cause 90 is 1 and the other is 1 to = 2 bytes not 4
10/07/2017 23:49 coolasf2re#5
Quote:
Originally Posted by 01001101 0100010 View Post
_MemoryWrite(0x5AFD16,$OPEN,"9090","byte[4]");

wont work at all try to convert the offset from hex to dez (u can use windows calculator and set to programmers. your offset 5AFD16 - in dez = 5963030

so it should look likt this

WRITEPROCESSMEMORY(PROCESSEXISTS($PROCESS), $S4CLIENT + 5963030, "0x9090", "byte[2]") byte is 2 cause 90 is 1 and the other is 1 to = 2 bytes not 4
the .au3, where i get _Memorywrite() from says :

Function: _MemoryWrite($iv_Address, $ah_Handle, $v_Data[, $sv_Type])
Description: Writes data to the specified memory address.
Parameter(s): $iv_Address - The memory address which you want to write to. It must be in hex format (0x00000000).

so i cant/shouldnt change the offset to dez