在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

相关推荐
FAREWELL000751 天前
Lua学习记录(4) --- Lua中多文件调用 以及 关于位运算符的零碎知识点
开发语言·学习·lua
测试涛叔1 天前
高频Postman软件测试面试题
测试工具·lua·postman
吃喝不愁霸王餐APP开发者1 天前
霸王餐试吃资格发放:Redis HyperLogLog亿级去重与Lua脚本原子性
数据库·redis·lua
骑着蜗牛百米冲刺1 天前
Postman自动化测试自动填充token
测试工具·lua·postman
黑客-秋凌1 天前
接口测试工具(postman)
自动化测试·软件测试·测试工具·集成测试·lua·postman
测试界媛姐1 天前
掌握Postman,开启API测试新纪元!
测试工具·lua·postman
FAREWELL000751 天前
Lua学习记录(5) --- Lua中的协同程序 也称线程Coroutine的介绍
开发语言·学习·lua
切糕师学AI1 天前
ARM中的汇编指令:MRS和MSR
汇编·嵌入式开发
r***11331 天前
【Java EE】Spring请求如何传递参数详解
spring·java-ee·lua
Chicheng_MA1 天前
OpenWrt WebUI 交互架构深度解析
javascript·lua·openwrt