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 


How would I accomplish this? |EIP Register to allocated mem

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

Joined: 02 Dec 2014
Posts: 23

PostPosted: Sun Apr 03, 2016 9:58 am    Post subject: How would I accomplish this? |EIP Register to allocated mem Reply with quote

Hi, so I'm working on a code that points the EIP register to my allocated memory, after many tries I'm still unsure how I would do this, so far I've tried:

alloc(newmem,2048)

newmem:
push ebp
mov ebp,esp
bla bla
bla bla
bla bla

{$lua}
function debugger_onBreakpoint()
EIP=newmem
debug_continueFromBreakpoint(co_run)
return 1
end

debug_setBreakpoint(0x00456789)
{$asm}

My theory itself works, the script doesn't. I've tried doing it manually and it's all fine, just how it's supposed to be. But what I'm aiming for is a script what makes it all automatic! If you could fix my code or point out the issue I would very much appreciate it! Keep in mind, I am not fluent in Lua and assembly, so I might not understand what the problem is. Thanks, I will make sure to remember you if you're able to help as this is something I've been trying to do for hours already.
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 Apr 03, 2016 11:32 am    Post subject: Reply with quote

Why would you even want to do this?
What's wrong with the standard injection that jumps to newmem?
Code:
alloc(newmem,2048)

newmem:
  //whatever

00456789:
  jmp newmem

...if you insist
Code:
autoAssemble([[
alloc(whatever,2048)
whatever:
  //whatever
registersymbol(whatever)
]])
whatever = getAddress("whatever")
function debugger_onBreakpoint()
  EIP=whatever
  debug_continueFromBreakpoint(co_run)
  return 1
end
debug_setBreakpoint(0x00456789)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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