[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
define(flykeyiddefault,10)
define(flybuttonoffsetdefault,6)
aobscanmodule(someStateTransitionCallerAOB,"rlControl_DX12.exef.dll",49 ** ** E8 ** ** ** ** 45 ** ** ** ** 00 00 45 ** ** ** ** 00 00 48 ** ** ** 48 ** ** 75 06 4C ** ** ** 74 03 FF ** ** 48)
registersymbol(someStateTransitionCallerAOB)
///
aobscanmodule(flyUpStateCallAOB,"Control_DX12.exe",40 53 48 ** ** ** 48 ** ** 40 01 00 00 48 ** ** 80 ** 01 74 17 48 ** ** ** ** ** ** C6 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 00)
registersymbol(flyUpStateCallAOB)
aobscanmodule(floatDownStateCallAOB,"Control_DX12.exe",40 53 48 ** ** ** 48 ** ** 40 01 00 00 48 ** ** 80 ** 01 74 17 48 ** ** ** ** ** ** C6 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 01)
registersymbol(floatDownStateCallAOB)
///
label(bFlyKeyPressed)
registersymbol(bFlyKeyPressed)
label(bFlyKeyID)
registersymbol(bFlyKeyID)
label(bFlyButtonOffset)
registersymbol(bFlyButtonOffset)
alloc(newmem,2048,someStateTransitionCallerAOB+16) //"rlControl_DX12.exef.dll"+1518C1)
label(returnhere)
label(originalcode_someStateTransitionCallerAOB)
registersymbol(originalcode_someStateTransitionCallerAOB)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
//mov rcx,[rsi+10]
//test rcx,rcx
//jnz end
//cmp [rsi+18],r13
//je end
@@:
mov rcx,flyUpStateCallAOB //"Control_DX12.exe"+CB020 //fly up
cmp [rsi+18],rcx
jne @f
mov rcx,pFlyUpCaller
mov [rcx],rsi
jmp end
@@:
mov rcx,floatDownStateCallAOB //"Control_DX12.exe"+CB160 //float down
cmp [rsi+18],rcx
jne end
mov rcx,pFloatDownCaller
mov [rcx],rcx
mov rcx,bFlyKeyPressed
cmp byte ptr [rcx],1
je @f
push rax
mov rcx,aControllerHotkeyPressed
mov rax,bFlyButtonOffset
movsxd rax,dword ptr [rax]
mov cl,[rcx+rax*4]
pop rax
test cl,cl
jnz @f
jmp end
@@:
mov rcx,pFlyUpCaller
mov rcx,[rcx]
test rcx,rcx
cmovnz rsi,rcx
end:
originalcode_someStateTransitionCallerAOB:
readmem(someStateTransitionCallerAOB+16,7)
//mov rcx,[rsi+10]
//test rcx,rcx
exit:
jmp returnhere
///
bFlyKeyPressed:
dd 0
bFlyKeyID:
dd flykeyiddefault
bFlyButtonOffset:
dd flybuttonoffsetdefault
pFlyUpCaller:
dq 0
pFloatDownCaller:
dq 0
///
someStateTransitionCallerAOB+16: //"rlControl_DX12.exef.dll"+1518C1:
jmp newmem
nop 2
returnhere:
///*****************************************///
aobscanmodule(flyTimeChkAOB,"Control_DX12.exe",80 ** ** ** ** ** 00 75 ** 48 ** ** ** F3 0F ** ** ** ** 00 00 F3 0F ** ** ** F3 0F ** ** ** ** 00 00 0F ** ** 72)
registersymbol(flyTimeChkAOB)
flyTimeChkAOB+7: //"Control_DX12.exe"+CB325:
db EB
///*****************************************///
//modified from ShyTwig16's lua keylistener script
//
http://fearlessrevolution.com/viewtopic ... =60#p62657
{$lua}
local function flyKeyLuaThread(thread4)
local addr4 = getAddressSafe('bFlyKeyPressed')
while FlyKeyLuaThreadLoop do
sleep(100)
if addr4 then
if ( isKeyPressed( readInteger('bFlyKeyID') ) ) then
writeBytes(addr4, 1)
else
writeBytes(addr4, 0)
end
else
addr4 = getAddressSafe('bFlyKeyPressed')
end
end
thread4.terminate()
-- while FlyKeyLuaThreadLoop do
-- if ( isKeyPressed(VK_CAPITAL) ) then
-- writeBytes("bFlyKeyPressed" ,1)
-- else
-- writeBytes("bFlyKeyPressed" ,0)
-- end
-- end
-- thread4.terminate()
end
----------------------------------
if syntaxcheck then return end
FlyKeyLuaThreadLoop = true
createThread(flyKeyLuaThread)
{$asm}
///*****************************************///
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
{$lua}
if syntaxcheck then return end
FlyKeyLuaThreadLoop = false
{$asm}
///*****************************************///
dealloc(newmem)
someStateTransitionCallerAOB+16: //"rlControl_DX12.exef.dll"+1518C1:
readmem(originalcode_someStateTransitionCallerAOB,7)
//db 48 8B 4E 10 48 85 C9
//Alt: mov rcx,[rsi+10]
//Alt: test rcx,rcx
unregistersymbol(originalcode_someStateTransitionCallerAOB)
unregistersymbol(bFlyKeyPressed)
unregistersymbol(bFlyKeyID)
unregistersymbol(bFlyButtonOffset)
///*****************************************///
flyTimeChkAOB+7: //"Control_DX12.exe"+CB325:
db 75
//Alt: jne
///*****************************************///