在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

相关推荐
是星辰吖~15 小时前
x86反汇编_深度学习_单链表
汇编
是星辰吖~16 小时前
x86反汇编_深度学习_链表OJ题反汇编
汇编
乾复道1 天前
k8s使用说明
汇编·程序人生
技术不好的崎鸣同学1 天前
x64汇编之堆栈工作原理理论篇(继上篇内容讲解)
汇编
xingpanvip1 天前
星盘接口开发文档:马盘次限盘接口指南
android·开发语言·python·php·lua
是星辰吖~2 天前
X86汇编:复杂逻辑判断_针对性扫盲
汇编
技术不好的崎鸣同学2 天前
x64汇编之用调试器进行程序分析:GDB
汇编
selt7912 天前
Redisson 源码深度分析
java·c++·redis·lua
FFZero12 天前
[mpv脚本系统] (三) C 函数如何注册成 Lua 模块
c++·音视频·lua
是星辰吖~2 天前
X86反汇编_深度学习:从 C 指针到汇编逻辑
汇编