在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 小时前
Frida Hook Cocos2dx lua 3.15 的 lua 脚本
lua·cocos2d
IT策士11 小时前
Redis 从入门到精通:事务与 Lua 脚本
redis·junit·lua
慧都小妮子11 小时前
不想频繁改 PLC?用 DeviceXPlorer Lua 脚本把产线业务逻辑放到 OPC Server 层
java·junit·lua·takebishi·dxpserver·设备数据采集软件·opc server
AI科技星15 小时前
第三卷:质数王朝志(全卷定稿)
c语言·开发语言·汇编·electron·概率论
H Journey15 小时前
汇编基础知识:CPU的寻址逻辑
汇编·cpu寻址
利来利往1 天前
Lua 中 or 规则
lua
lpl3129055091 天前
skynet 共享数据原理
服务器·c语言·lua
AI科技星2 天前
《全域数学/数术工坊》体系总览
c语言·开发语言·汇编·electron·概率论
lpl3129055092 天前
skynet 共享数据项目级应用
服务器·c语言·lua
H Journey2 天前
用汇编语言写一个hello world,并进行汇编和编译
汇编·assembly·寄存器