Jump to content

Read/WriteProcessMemory using CheatEngine Values with Pointer VB

Go to solution Solved by Mr_KoKa,

Is the address you find green? If not yo u will need to find addrest to points at the pointer until you find static address (it appears green on the list). And when you get static address you go from there to where it points to then again, pointer points to another memory address until you get to the value, other then that I have no idea.

I am using Cheat Engine to get addresses to edit something in the application. But it seems like I'm doing it wrong when putting the values in Visual Studio using Read/WriteProcessMemory and Visual Basic.

 

XlkvA.png

 

Here is the values I got in Cheat Engine. Now how can I translate these information and use ReadProcessMemory to get the value?

Here is my code which isn't working and giving different value:

Dim hp = OpenProcess(2035711, 0, ComboBox1.SelectedItem)
Dim Pointer = 0
ReadProcessMemory(hp, 22724000, Pointer, 4, 0)
Dim Address As Integer = Pointer + Convert.ToInt32("784B2", 16)

Dim value As Integer = 0
ReadProcessMemory(hp, Address, value, 4, Nothing)
MsgBox(value)

 

I don't know how to use the values given by CE so if there's anything wrong with how I use the values in the code, teach me.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to post
Share on other sites

Try to check if ReadProcessMeMory or OpenProcess doesn't fail, is 2035711 your access flags? When I was using ReadAddressMemory I just used read access, but it is included in yours anyway so it should be ok, unless it cannot get other privilages and fails. Can you show how your function imports look like?

Link to post
Share on other sites

21 hours ago, Mr_KoKa said:

Try to check if ReadProcessMeMory or OpenProcess doesn't fail, is 2035711 your access flags? When I was using ReadAddressMemory I just used read access, but it is included in yours anyway so it should be ok, unless it cannot get other privilages and fails. Can you show how your function imports look like?

I'm not sure if the address is correct(with the pointer added to it) because it does not give the correct values and just 0. The value that I am expecting is 1. How to get the static pointer? I just found out that the pointer was changing and nothing(in the list of pointers) gives the exact values when the game is restarted.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to post
Share on other sites

Is the address you find green? If not yo u will need to find addrest to points at the pointer until you find static address (it appears green on the list). And when you get static address you go from there to where it points to then again, pointer points to another memory address until you get to the value, other then that I have no idea.

Link to post
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

×