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 


C# Jmp Mov

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
neowrs
Newbie cheater
Reputation: 0

Joined: 07 Oct 2015
Posts: 15

PostPosted: Sun Dec 13, 2015 11:49 am    Post subject: C# Jmp Mov Reply with quote

___asm
{
mov [ebp-0000004C],eax
}
how can write something using C# to eax such as mov [ebp-0000004C],001E9874 <<< something like that
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Dec 13, 2015 12:16 pm    Post subject: Reply with quote

Use WriteProcessMemory to write the bytes which make up that instruction.
Since your new instruction takes up more space than the original, you'll need to find something else to get rid of.
If you're lucky, you'll no longer require EAX anywhere.
So if the previous instruction sets EAX, you can overwrite it as well.
Otherwise, you'll need to allocate new memory and write the corresponding bytes responsible for jumping (like CE does).
Use the search at the top of the forums for writing code caves and jump routines.
Back to top
View user's profile Send private message
neowrs
Newbie cheater
Reputation: 0

Joined: 07 Oct 2015
Posts: 15

PostPosted: Sun Dec 13, 2015 1:41 pm    Post subject: Reply with quote

Zanzer wrote:
Use WriteProcessMemory to write the bytes which make up that instruction.
Since your new instruction takes up more space than the original, you'll need to find something else to get rid of.
If you're lucky, you'll no longer require EAX anywhere.
So if the previous instruction sets EAX, you can overwrite it as well.
Otherwise, you'll need to allocate new memory and write the corresponding bytes responsible for jumping (like CE does).
Use the search at the top of the forums for writing code caves and jump routines.

thanks
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 programming 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