在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

相关推荐
是星辰吖~2 小时前
X86反汇编:内存幻影_数组解码纪元(3-2)
汇编
是星辰吖~5 小时前
X86反汇编:内存矩阵与指针之剑(3-1)
汇编
iCxhust21 小时前
如何利用iret修改cs ip
汇编·单片机·嵌入式硬件·微机原理·8088单板机
wapicn991 天前
API接口调试笔记:从注册到第一个数据返回,全流程详解
java·开发语言·python·lua
是星辰吖~2 天前
X86反汇编:透视之眼_反编译特训(1-2)
汇编
是星辰吖~2 天前
X86反汇编:破茧成蝶 —— 赤裸逻辑与机械之心(1-1)
汇编
kebeiovo2 天前
C++与 Lua的交互
c++·lua
逆向命运2 天前
PC企微搜索手机号窗口绕过
c语言·汇编·c++·飞书·企业微信
是星辰吖~3 天前
函数战争:内存领地的争夺与撤退
汇编
wh_xia_jun3 天前
Apifox 测试项目实操1
开发语言·lua