在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

相关推荐
姓蔡小朋友6 小时前
LUA脚本
开发语言·junit·lua
金融新世界8 小时前
推动产业升级:倒逼转型创新与重构产业链格局
lua
oMcLin11 小时前
如何在 Debian 11 上配置并优化 Nginx 与 Lua 脚本,提升高并发网站的动态请求处理能力?
nginx·debian·lua
源代码•宸13 小时前
goframe框架签到系统项目开发(补签逻辑实现、编写Lua脚本实现断签提醒功能、简历示例)
数据库·后端·中间件·go·lua·跨域·refreshtoken
每天回答3个问题14 小时前
Lua 函数教程
开发语言·ue5·ue4·lua
fengye2071611 天前
板凳----------(枯藤 )vs2026+win10(第六章-4)
汇编
-曾牛1 天前
【汇编语言入门】从第一个加法程序吃透汇编核心基础
汇编·单片机·嵌入式硬件·汇编语言·病毒分析·lcx·逆向开发
星空露珠1 天前
时间罗盘小界面模组
开发语言·数据结构·算法·游戏·lua
fredricen1 天前
Openwrt21.02应用日志全局开关控制
lua·openwrt·luci
每天回答3个问题1 天前
Lua Table(表)
开发语言·ue4·lua·虚幻引擎