在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

相关推荐
百***359420 小时前
【Java EE】Spring请求如何传递参数详解
spring·java-ee·lua
资料,小偿1 天前
4.1.1基于51单片机汇编语言出租车计价器可切换白天黑夜,可修改价格
汇编·51单片机·proteus
embrace991 天前
【C语言学习】数据在内存中存储
java·c语言·开发语言·汇编·c++·学习·算法
IMPYLH2 天前
Lua 的 pairs 函数
开发语言·笔记·后端·junit·单元测试·lua
这人很懒没留下什么5 天前
SpringBoot2.7.4整合Oauth2
开发语言·lua
IMPYLH6 天前
Lua 的 collectgarbage 函数
开发语言·笔记·junit·单元测试·lua
IMPYLH6 天前
Lua 的 assert 函数
开发语言·笔记·junit·单元测试·lua
王中阳Go6 天前
库存防超卖(Redis Lua+分布式锁对比实践)
redis·分布式·lua
u***j3247 天前
后端服务限流实现,Redis+Lua脚本
java·redis·lua
T.Ree.7 天前
汇编_mov指令
汇编