Jump to content

NomadMemory/ _MemoryWrite()


Recommended Posts

Hello,

So as the tittles says i am using nomadmemory. Basicly im trying to write a simple code to change values of my client.

Here is my code:

#include <NomadMemory.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <Misc.au3>
#include <Array.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#Include <Constants.au3>
#include <EditConstants.au3>
Global $button[2]
$hGUI = GUICreate("mc_pro", 150,200)
$label = GUICtrlCreateLabel("", 10, 10)
$button[0] = GUICtrlCreateButton("On", 10, 50,70,40)
$button[1] = GUICtrlCreateButton("Off", 10, 100,70,40)
GUISetState(@SW_SHOW)
If ProcessExists("mc_client.exe") Then
$exist=1
else
$exist=0
EndIf
if $exist=0 then
MsgBox(0, "Error", "Please start mc_client first!!")
exit
EndIf

$open = _MemoryOpen(ProcessExists("mc_client.exe"))
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $button[0]
_MemoryWrite(0x004DF73C, $open, 12345, "int")
Case $button[1]
_MemoryWrite(0x004DF73C, $open, 54321, "int")
EndSwitch
WEnd

Ok i got the Static addresses of the values i want to change (0004DF73C- offset 34, 0004DF73C- offset 14).

What i want to do is to change the value. How should _MemoryWrite command be used???

Edit: Edit they are both ints' and their value is 0.

Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

Yes i realized that now. It must have been a mistake in the copy-paste.

I fixed them. But that's not the problem because i was using it with the right addresses in my computer.

I don't really know nomadmemory so i dont know how if usage of _MemoryWrite function is right

I feel nothing.It feels great.

Link to comment
Share on other sites

I can't test it right now, but you can give it a try :

_MemoryWrite(0x4DF73C, $open, 12345, "dword") ;32bits
_MemoryWrite(0x004DF73C, $open, 12345, "dword") ;64bits

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

I got a fatal error that crushes my window saying:

Win32 Exception:0xc0000005[0x428]

()

Edit: I tried a tool (Cheat Egnine 6.1 if you know it) to try change the addresses to see if they can or cannot be changed and it works fine. I add the addresses manually, since they are static addresses, and i just change them.

Why the function wont work???...

Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

hm... it should work.

Posted Image

Can you try this simple test? check if the value is correctly read and assigned :

NB: check also if the memory address type is 4bytes.

$hOpen = _MemoryOpen(ProcessExists("calc.exe"))
ConsoleWrite(_MemoryRead(0x00393F3C, $hOpen, "dword") & @CrLf)
_MemoryWrite(0x00393F3C, $hOpen, 12345, "dword")

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

hmmmm.... somethings' wierd in my script.

The address has to have an offset F4 to be the right one. There are more static addresses with same address but other offsets.

How do i set the offset of that address to be F4???

I feel nothing.It feels great.

Link to comment
Share on other sites

hmmmm.... somethings' wierd in my script.

The address has to have an offset F4 to be the right one. There are more static addresses with same address but other offsets.

How do i set the offset of that address to be F4???

??

address + offset? (by definition)

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...