Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Asm pointer and headache

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Molgos
How do I cheat?
Reputation: 0

Joined: 22 Apr 2016
Posts: 2

PostPosted: Fri Apr 22, 2016 8:23 am    Post subject: Asm pointer and headache Reply with quote

Hi, sorry, my question is probably stupid, but can you help me with a asm script ?

The original code is :
originalcode:
mov [edi],edx
mov eax,[esi+1C]

If i add this after :
mov [myprog.exe+3B3444], edi

I've got on cheat engine, this value for [myprog.exe+3B3444] = 876602800 (= 0x343FE5B0)
(Not a fixed one, it can probably change)
But it's not what i want, i want into myprog.exe+3B3444, the same value than in 0x343FE5B0
Any idea how to do it ?

Thanks.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Apr 22, 2016 4:26 pm    Post subject: Reply with quote

Please rephrase your question. I have no idea what you're asking.
Back to top
View user's profile Send private message
Molgos
How do I cheat?
Reputation: 0

Joined: 22 Apr 2016
Posts: 2

PostPosted: Fri Apr 22, 2016 4:54 pm    Post subject: Reply with quote

I will try to put screenshot to explain but i don't have the right to post screenshot, so please remplace [dot] by a dot.

imgur[dot]com/a/kBvQe

On my prog, 0x3355E5B0 got this value : 1052366
[See first screenshot]
(It's not always 0x3355E5B0 who hold it, and the value change constantly)

So, if i get what's write to this adress i got that :
[See 2nd screenshot]

I want to stock the same value that go on 0x3355E5B0 on an other variable, i can use prog+3B3444 to hold it. (So, in this instance i want that prog+3B3444 got the value 1052366 on the first screenshot)

[See 3nd screenshot]
If i execute this injection, where i added : mov [prog+3B3444], edi after the original code, i've got this value on [prog+3B3444] : 861267376

[See last screenshot]
861267376 decimal = 0x3355E5B0, so that's the adress of the first screenshot.
How can i change the asm to put on [prog+3B3444] the current value (1052366) of 0x3355E5B0 instead of the adress itself ?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Apr 22, 2016 7:22 pm    Post subject: Reply with quote

Please use a different image site...imgur sucks and I can't view the pictures without allowing hundreds of scripts first.

Have you completed the CE tutorial?

Thanks.
Back to top
View user's profile Send private message
Molgos
How do I cheat?
Reputation: 0

Joined: 22 Apr 2016
Posts: 2

PostPosted: Fri Apr 22, 2016 9:38 pm    Post subject: Reply with quote

tof.canardpc[dot]com/view/de08a844-4f9e-4169-bbb7-425b96f3b2f8.jpg

tof.canardpc[dot]com/view/0c093c67-0c02-4b94-8eae-978c273e00df.jpg

tof.canardpc[dot]com/view/0a3bc838-8181-4485-8905-33388d9b3e5d.jpg

tof.canardpc[dot]com/view/19c08e5f-865e-4860-a7ba-dc1a7ed43713.jpg
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Apr 22, 2016 9:45 pm    Post subject: Reply with quote

Code:
newmem:
push ebx
mov ebx,[edi]
mov [prog.exe+3B3444],ebx
pop ebx
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Fri Apr 22, 2016 9:49 pm    Post subject: Reply with quote

Just look at the assembly code and you should see exactly what's wrong.
mov [edi],edx - moves the value in the edx register into the memory location at the address edi.

So, if you just want the value, use the edx register instead since that's the new value. However, it might be better to store the address like you are doing. Treating it like a pointer will make sure you can get values that are written to this address by another instruction. Of course, if you only care about the values this instruction writes to the address, then just pass it by value.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites