在CE自动汇编里调用lua函数

CE自动汇编模板里有一个是调用lua函数,但是关于如何使用的资料很少,结果问AI也是各种错误回答,还各种误导...

下面是32位游戏的例子:

cpp 复制代码
loadlibrary(luaclient-i386.dll)
luacall(openLuaServer('CELUASERVER'))

CELUA_ServerName:
db 'CELUASERVER',0

{$lua}
function myfunction(param)
  showMessage("param:"..param)
end

{$asm}
alloc(myluascript,256)
myluascript:
db 'myfunction(parameter)',0

alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
//place your code here
pushad
push 0x00D9F000 //param
push myluascript
call CELUA_ExecuteFunction
popad

originalcode:
call _Launcher.exe+68FBA0

exit:
jmp returnhere

"_Launcher.exe"+68E1C0:
jmp newmem
returnhere:

参考资料:

https://forum.cheatengine.org/viewtopic.php?t=605733

https://forum.cheatengine.org/viewtopic.php?t=615359

相关推荐
liulilittle11 小时前
递归复制搜索所有的lua文件到指定目录
java·开发语言·lua·cmd
wechatbot88813 小时前
极客互动企业微信聚合聊天与接口能力全景展示
汇编·微信·企业微信·ipad
上海合宙LuatOS14 小时前
LuatOS 课程-011 讲:GNSS应用开发
网络·物联网·lua·luatos
枷锁—sha1 天前
【CTFshow-pwn系列】03_栈溢出【pwn 072】详解:无字符串环境下的多级 Ret2Syscall 与 BSS 段注入
服务器·网络·汇编·笔记·安全·网络安全
LcGero2 天前
游戏引擎Luanti的前世今生与技术解析
游戏引擎·lua·游戏开发·我的世界·luanti
绿草在线3 天前
SpringBoot请求与响应全解析
spring boot·后端·lua
心之所向,自强不息4 天前
VSCode + EmmyLua 调试 Unity Lua(最简接入 + 不阻塞运行版)
vscode·unity·lua
iCxhust4 天前
8088汇编测试程序 (MASM/TASM) — 显示 “HELLO 8088!“ + “LCD1602 OK“
汇编·单片机·嵌入式硬件·51单片机·微机原理
weixin_408099674 天前
Lua请求文字识别ocr api
图像处理·人工智能·后端·ocr·lua·api·文字识别
上海合宙LuatOS4 天前
LuatOS扩展库API——【libfota】远程升级
物联网·junit·lua·luatos