在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

相关推荐
Macbethad12 小时前
自动化测试技术报告
开发语言·lua
Wpa.wk16 小时前
接口测试 - 接口测试工具 Postman-基础使用
经验分享·测试工具·lua·postman
それども17 小时前
浏览器CSR和SSR渲染区别
javascript·lua
切糕师学AI1 天前
ARM 汇编指令:UBFX
汇编·arm开发
切糕师学AI1 天前
ARM 汇编指令:STP\LDP
汇编·arm开发
lakernote2 天前
EasyPostman:开源免费的 Postman 替代方案,完美支持国产化操作系统
开源·lua·postman
Trouvaille ~2 天前
【Linux】库制作与原理(三):动态链接与加载机制
linux·c语言·汇编·got·动静态库·动态链接·plt
猫猫的小茶馆2 天前
【ARM】从零封装STM32标准库
汇编·arm开发·stm32·单片机·嵌入式硬件·架构
切糕师学AI2 天前
ARM 汇编指令:PUSH 和 POP
汇编·arm开发·assembly
切糕师学AI2 天前
ARM 汇编指令:ERET
汇编·arm开发