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 to insert Assembly code in CE lua?

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

Joined: 18 Aug 2020
Posts: 3

PostPosted: Tue Aug 18, 2020 8:39 pm    Post subject: how to insert Assembly code in CE lua? Reply with quote

I want to execute Assembly code in CE Lua,like inline assembly in C++. such as

push ebp
mov ebp,esp
mov eax,dword ptr ds:[0x1AF8DB8]
inc eax
mov edx,eax
shr edx,0x8
...
ret 8
Can it be achieved? Very Happy [/quote]
Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 1

Joined: 03 May 2020
Posts: 49

PostPosted: Wed Aug 19, 2020 5:23 am    Post subject: Re: how to insert Assembly code in CE lua? Reply with quote

autoAssemble
Back to top
View user's profile Send private message
JohnathanSweeney
Newbie cheater
Reputation: 1

Joined: 04 Apr 2016
Posts: 20

PostPosted: Wed Aug 19, 2020 8:27 pm    Post subject: Reply with quote

check the wiki:
https://wiki.cheatengine.org/index.php?title=Lua:autoAssemble
Back to top
View user's profile Send private message
lsj8924
How do I cheat?
Reputation: 0

Joined: 18 Aug 2020
Posts: 3

PostPosted: Thu Aug 20, 2020 9:09 am    Post subject: Reply with quote

JohnathanSweeney wrote:
check the wiki:

thank you. autoAssemble is used for hooking the program. it's aimed to change the program's execution flow. I donnot need it. I want to execute Assembly just as a function in CE and get the result. such as:
[[
mov eax,0x12345678
and eax,0xFFFF
]]
I want to get the result 0x5678.
Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 1

Joined: 03 May 2020
Posts: 49

PostPosted: Fri Aug 21, 2020 5:16 am    Post subject: Reply with quote

function AND(a,b)
autoAssemble([==[
globalAlloc(ANDO,50)
ANDO:
mov eax,[esp+4]
and eax,[esp+8]
ret
]==])
return executeCodeEx(1,nil,'ANDO',a,b)
end
print(AND(545,564))
Back to top
View user's profile Send private message
lsj8924
How do I cheat?
Reputation: 0

Joined: 18 Aug 2020
Posts: 3

PostPosted: Fri Aug 21, 2020 9:30 am    Post subject: Reply with quote

blankTM wrote:
function AND(a,b)
autoAssemble([==[
globalAlloc(ANDO,50)
ANDO:
mov eax,[esp+4]
and eax,[esp+8]
ret
]==])
return executeCodeEx(1,nil,'ANDO',a,b)
end
print(AND(545,564))


Thank you!!! you're awesome!!!
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