View previous topic :: View next topic |
Author |
Message |
Skyrimfus Cheater Reputation: 1
Joined: 17 Mar 2016 Posts: 42
|
Posted: Thu Jul 22, 2021 5:50 pm Post subject: LUA assemble(not to be confused with autoAssemble) |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Fri Jul 23, 2021 1:57 am Post subject: |
|
|
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 |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Fri Jul 23, 2021 2:09 am Post subject: |
|
|
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 |
|
|
|