在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

相关推荐
Arva .11 小时前
HTTP Client
网络协议·http·lua
日更嵌入式的打工仔1 天前
汇编与反汇编
汇编
爱吃小胖橘1 天前
Lua语法(2)
开发语言·unity·lua
ellis19702 天前
LuaC API知识点汇总
unity·lua
爱吃小胖橘5 天前
Lua语法
开发语言·unity·lua
东方芷兰5 天前
JavaWeb 课堂笔记 —— 20 SpringBootWeb案例 配置文件
java·开发语言·笔记·算法·log4j·intellij-idea·lua
1nullptr5 天前
Lua上值与闭包
开发语言·lua
oioihoii6 天前
从汇编角度看C++优化:编译器真正做了什么
java·汇编·c++
CHANG_THE_WORLD6 天前
函数简单传入参数的汇编分析
汇编·c++·算法
GHL2842710907 天前
i++汇编学习
汇编·学习