精易论坛

标题: CE,HOOK脚本如何用易语言写出来 [打印本页]

作者: 135246    时间: 2019-10-18 20:31
标题: CE,HOOK脚本如何用易语言写出来
loadlibrary(luaclient-i386.dll)
luacall(openLuaServer('CELUASERVER'))

CELUA_ServerName:
db 'CELUASERVER',0

{
//luacall call example:
push integervariableyouwishtopasstolua
push addresstostringwithfunction  //(The lua function will have access to the variable passed by name "parameter")
call CELUA_ExecuteFunction

//------
//Alternate call by ref example:

mov eax,[addresswithluafunctionidstored]
test eax,eax
jne short hasrefid

push addresswithluafunctionname
call CELUA_GetFunctionReferenceFromName  //Basically calls createRef(functionname) and returns the value
mov [addresswithluafunctionidstored],eax
hasrefid:
mov [addresswithparameterlist],param1
mov [addresswithparameterlist+4],param2
mov [addresswithparameterlist+8],param3
//...
push 0 //0=no async, 1=async.  Use async if you do not wish to update the GUI. Faster
push addresswithparameterlist
push numberofparameterstopass
push eax //push the reference ID of the function
call CELUA_ExecuteFunctionByReference

When done EAX will contain the result of the lua function
And as per common 32-bit calling convention, EDX and ECX could have been altered. So save/restore them beforehand
}
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
NOP
NOP

exit:
jmp returnhere

"PlantsVsZombies.exe"+8728C:
jmp newmem
nop
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"PlantsVsZombies.exe"+8728C:
NOP
NOP
//Alt: db 83 47 24 01 8B 47 24


[上面的这些是HOOK的数据,该怎么用易语言写出来,以及还回HOOK数据,求源]


作者: 135246    时间: 2019-10-18 20:31
不需要返回了,谢谢
作者: 德友    时间: 2019-10-24 01:46
看起来挺牛逼的。
作者: 已asdawd    时间: 2019-11-16 08:51
我可以 加我!QQ3229672774

作者: 已asdawd    时间: 2020-1-15 22:48
加我QQ:3229672774





欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4