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 


Change EIP register at breakpoint via Lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MikeNoey
Advanced Cheater
Reputation: 0

Joined: 08 Jun 2018
Posts: 64

PostPosted: Fri Feb 14, 2020 2:44 am    Post subject: Change EIP register at breakpoint via Lua Reply with quote

So I'm trying to detour to my own code via breakpoint and using my pointer symbol in the EIP register and it works fine doing it manually but doing it via Lua is proving challenging. I know it's working because I'm doing this to bypass an integrity check and the code I'm detouring to is doing it's job but the issue I'm having is that everytime the breakpoint hits a message shows "Something happened" and I have to click that and then I have to manually hit "run" to resume the game. I'll provide the Lua code I'm using. Appreciate any info on what I am doing wrong. Thank you all.

Code:
function debugger_onBreakpoint()
EIP = getAddress("BypassIntChck")
debug_continueFromBreakpoint(co_run)
end

reinitializeSymbolhandler()
debugProcess(2)
debug_setBreakpoint("00197206")
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25809
Location: The netherlands

PostPosted: Fri Feb 14, 2020 2:55 am    Post subject: Reply with quote

try replacing
Code:

debug_continueFromBreakpoint(co_run)

with
Code:

return 1

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
MikeNoey
Advanced Cheater
Reputation: 0

Joined: 08 Jun 2018
Posts: 64

PostPosted: Fri Feb 14, 2020 3:20 am    Post subject: Reply with quote

That did the trick DarkByte. Working like a charm now. Thanks a million
Back to top
View user's profile Send private message
MikeNoey
Advanced Cheater
Reputation: 0

Joined: 08 Jun 2018
Posts: 64

PostPosted: Fri Feb 14, 2020 11:24 am    Post subject: Reply with quote

Not working via Trainer. When making the trainer using 64 bit I get an error related to VEH debugger. Im guessing because I'm using EIP instead or RIP maybe + the game is 32 bit so I tried making the trainer using a 32 bit CE and choosing 32 bit as the option and no longer getting any error messages. I also ticked/checked every added feature box. Unfortunately for some reason the integrity check is still working and isn't disabled when running the same code in a Trainer as opposed to using Cheat Engine
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 Lua Scripting 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