在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

相关推荐
这人很懒没留下什么11 小时前
SpringBoot2.7.4整合Oauth2
开发语言·lua
IMPYLH1 天前
Lua 的 collectgarbage 函数
开发语言·笔记·junit·单元测试·lua
IMPYLH2 天前
Lua 的 assert 函数
开发语言·笔记·junit·单元测试·lua
王中阳Go2 天前
库存防超卖(Redis Lua+分布式锁对比实践)
redis·分布式·lua
u***j3242 天前
后端服务限流实现,Redis+Lua脚本
java·redis·lua
T.Ree.3 天前
汇编_mov指令
汇编
CC-NX4 天前
32位汇编:实验12动态链接库
汇编
资料,小偿4 天前
4.101基于8086国旗图案proteus8.9,8086彩灯图案流水灯图案,国期图案仿真,四个开关四种模式。近期本人原创
汇编·proteus
AI_56785 天前
接口测试“零基础通关“:Postman从入门到自动化测试实战指南
开发语言·lua
kewu89715 天前
Postman 完全入门教程
测试工具·lua·postman