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 


I feel so stupid

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

Joined: 30 May 2020
Posts: 3

PostPosted: Sat May 30, 2020 3:10 pm    Post subject: I feel so stupid Reply with quote

Spent entire day today trying to debug my code, because i kept crashing. I checked my hook, i checked how the registers were changed, looked how the stack changed, tried a bunch of different calling conventions, but nothing helped. Then i tried to move my hook a couple of bytes up. So i'm guessing my hook was in the middle of some jump destination or something? God, what a waste of a day. Is there any way of making sure something like this doesn't happen again? Who knows, there might be a really obscure jump somewhere that lands on that exact spot, but it could be very conditional, and cause a crash once in an hour or so, which would make debugging a nightmare. Luckily for me, my game crashed when i performed a certain action though. So don't be like me kids, try shifting up or down a little when hooking.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Sat May 30, 2020 4:17 pm    Post subject: Reply with quote

Branches (conditional or unconditional) to the middle of a function usually only happen from within the function itself. It's quite rare when it interferes with a code injection, and if it does happen, you can usually see it by enlarging the disassembler window.

If you must be more reasonably sure, you can use CE's dissect code feature (Tools -> Dissect Code). Last I checked this couldn't target dynamically allocated memory (e.g. result of JIT compilation), so in that case you'd have to go through Lua to dissect the correct region (View -> Memory Regions).
Code:
getDissectCode().dissect(0x1234000,0x1C000)

_________________
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
BoozeAddict
How do I cheat?
Reputation: 0

Joined: 30 May 2020
Posts: 3

PostPosted: Wed Jun 03, 2020 3:41 am    Post subject: Reply with quote

Yeah it did happen from the function itself, but i couldn't see it even with full screen. It was a pretty big jump. Didn't know about the dissect data feature, it's exactly what i needed, thanks a bunch.
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