 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
wulfcare Advanced Cheater
Reputation: 0
Joined: 27 Feb 2023 Posts: 64
|
Posted: Tue Mar 28, 2023 12:40 am Post subject: Possible to automatically execute script on process attach? |
|
|
Is it possible for this to automatically execute when I attach cheat engine to the target process.
Code: | alloc(newmem,2048,"myGame.exe"+165D88)
label(returnhere)
label(originalcode)
label(exit)
// Define a variable to store the value
alloc(value, 8)
newmem:
// Save the value from R13+88 into R10
mov r10,[r13+00000088]
// Store the value from R10 into the variable
mov [value], r10
// Jump back to the original code
jmp originalcode
originalcode:
// Continue with the original code
mov r10,[r13+00000088]
exit:
jmp returnhere
"myGame.exe"+165D88:
jmp newmem
nop 2
returnhere:
|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 468
Joined: 09 May 2003 Posts: 25717 Location: The netherlands
|
Posted: Tue Mar 28, 2023 1:38 am Post subject: |
|
|
try this lua code:
Code: |
local executedlist={}
local oldpo=MainForm.OnProcessOpened
MainForm.OnProcessOpened=function(processid, processhandle, caption)
if not executedlist[processid] then
local r,r2=autoAssemble([[
alloc(newmem,2048,"myGame.exe"+165D88)
label(returnhere)
label(originalcode)
label(exit)
// Define a variable to store the value
alloc(value, 8)
newmem:
// Save the value from R13+88 into R10
mov r10,[r13+00000088]
// Store the value from R10 into the variable
mov [value], r10
// Jump back to the original code
jmp originalcode
originalcode:
// Continue with the original code
mov r10,[r13+00000088]
exit:
jmp returnhere
"myGame.exe"+165D88:
jmp newmem
nop 2
returnhere:
]])
if r then
executedlist[processid]=true
print("assembled the script into the target")
else
print("Error assembling the script: "..r2)
end
end
if oldpo then
return oldpo(processid, processhandle, caption)
end
end
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|