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 do I find the parameter used in a function call?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
m_miro
Newbie cheater
Reputation: 0

Joined: 31 Jul 2019
Posts: 19

PostPosted: Sun Aug 04, 2019 12:52 am    Post subject: Reply with quote

You're right fopen/fopen_s are not used instead CreateFileA and ReadFile are, placing breakpoints on those functions do result in breaks.
But I looked at the disassembly in ghidra and I do see uses of both fopen and CreateFileA.
Back to top
View user's profile Send private message
m_miro
Newbie cheater
Reputation: 0

Joined: 31 Jul 2019
Posts: 19

PostPosted: Tue Aug 06, 2019 10:35 am    Post subject: Reply with quote

I am able to find the parameters of a function call now, but I've run into another problem.

There's a lot of files that are being read with the function ReadFile during the start of the game, so I wrote a lua script to automate finding the file I want so I don't have to read at each breakpoint.

Here is the script
Code:
debug_removeBreakpoint("ReadFile")
debug_setBreakpoint("ReadFile")
debug_continueFromBreakpoint("co_run")

function debugger_onBreakpoint()
stackValue = readInteger(ESP+0xc)
if(stackValue == 40960)then
speak("Match Found for hex value "..string.format('%x',stackValue))
else
speak("no dice ")
debug_continueFromBreakpoint("co_run")
doKeyPress(13)
end
end


The problem I'm having is the game needs focus or it pauses and when the script runs a form pops up that says "Sh*t Happened" and requires me to close the form before the scripts runs again shifting the focus away form the game.

I tried fixing it by simulating an enter key press, but the focus is still on cheat engine instead of the game. What causes this form to popup, is there a way to disable it and is there a way to shift focus back to the game if I can't disable it?
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
Goto page Previous  1, 2
Page 2 of 2

 
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