在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

相关推荐
xxjj998a15 小时前
PHP与汇编:从Web到硬件的编程差异
开发语言·汇编·php
陈eaten1 天前
汇编使用AES指令集实现AES解密
汇编·python·aes解密·aes指令集
顾鉴行思2 天前
10 字符串常量到底存在哪里?
c语言·汇编·经验分享
晴夏。2 天前
unlua实现原理
游戏·ue5·ue4·lua·ue·unlua
iCxhust2 天前
在 emu8086 中可以直接编译运行的完整汇编程序,演示数组的定义、遍历、求和、求最大值。
开发语言·前端·javascript·汇编·单片机·嵌入式硬件·算法
晴夏。2 天前
c++调用lua的方法
c++·游戏引擎·lua·ue
浩浩测试一下2 天前
堆栈中的 参数与局部变量 (逆向分析)
汇编·逆向·免杀·堆栈·windows编程·pe壳
iCxhust2 天前
微机原理实践教程(C语言篇)---A001闪烁灯
c语言·开发语言·汇编·单片机·嵌入式硬件·51单片机·微机原理
chxii3 天前
lua中Table 与 Metatable
lua
xingpanvip3 天前
星盘接口开发文档:组合三限盘接口指南
android·开发语言·前端·python·php·lua