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 


writeBytes lua to nop an instruction of a size larger then 2

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

Joined: 29 Sep 2022
Posts: 5

PostPosted: Wed Feb 08, 2023 11:59 am    Post subject: writeBytes lua to nop an instruction of a size larger then 2 Reply with quote

This works v
game.exe+A58 - 89 83
writeBytes('game.exe+A58', 0x90, 0x90)


but when it comes to "68090000" it just seems to crash when replacing with 0x90, I am very new with Lua and especially with modifying instructions, what am I doing wrong here? v

game.exe+A58 - 89 83 68090000
writeBytes('game.exe+A58', 0x90, 0x90, 0x90)

How would I nop an instruction with a size of "68090000" ?
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Wed Feb 08, 2023 12:30 pm    Post subject: Reply with quote

If it is 6 bytes long, don't you need to NOP all 6 bytes?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4297

PostPosted: Wed Feb 08, 2023 1:02 pm    Post subject: Reply with quote

n1c0 wrote:
game.exe+A58 - 89 83 68090000

This could also be read as "game.exe+A58 - 89 83 68 09 00 00"

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

Joined: 29 Sep 2022
Posts: 5

PostPosted: Thu Feb 09, 2023 3:59 pm    Post subject: Reply with quote

ParkourPenguin wrote:
n1c0 wrote:
game.exe+A58 - 89 83 68090000

This could also be read as "game.exe+A58 - 89 83 68 09 00 00"


Thank you! This was very helpful, my scripts are much better now that I know how to properly modify instructions like these Smile
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