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 


LUA assemble(not to be confused with autoAssemble)

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

Joined: 17 Mar 2016
Posts: 42

PostPosted: Thu Jul 22, 2021 5:50 pm    Post subject: LUA assemble(not to be confused with autoAssemble) Reply with quote

Does CE have a function that takes asm instructions, and outputs the AOB for that specific instruction?

Example:

Code:

assemble([[mov eax,0
push eax
pop eax
ret]])


Output:
{0xB8, 0x00, 0x00, 0x00, 0x00, 0x50, 0x58, 0xC3}

Does something like this exist?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Jul 23, 2021 1:57 am    Post subject: Reply with quote

Inside CE there's a single line assembler that does that(except it only takes 1 line at a time)
but it's not exported to lua. I'll add it for next version.

(It is exported to CE's plugin system though, so I guess you could make a plugin that exposes it to lua)

_________________
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
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Fri Jul 23, 2021 2:09 am    Post subject: Reply with quote

CE has some binutil (search celua.txt) function, but it seems for disassembling not assembling.

CE's autoAssemble need an starting address, else it may not resolve the instructions.
And it actually assemble the code to memory in order to get the bytes.
To get the byte, it need to know where the assembled bytes ended.

Here an example function
https://pastebin.com/51WWMtNp
Hope it fit your need.

_________________
- Retarded.
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