 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Jul 02, 2024 5:19 am Post subject: autoAssemble lua function fails to execute |
|
|
| Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
{$lua}
autoAssemble([[
alloc(newmem,1024,ntdll.dll)
label(title)
label(text)
newmem:
sub rsp,68
mov r9,0
lea r8,[title]
lea rdx,[text]
xor rcx,rcx
call MessageBoxA
add rsp,68
ret
title:
db 'hello',0
text:
db 'text',0
createthread(newmem)
]],true)
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
|
I am using cheat engine 7.5 and this assembly instruction was successfully executed by the attached process, but I wanted to execute it on the ce itself, but no popups popped up after I executed it. Is this a bug? Help me
:cry:
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1528
|
Posted: Tue Jul 02, 2024 6:47 am Post subject: |
|
|
Do you think the application is correct?
| Code: | | alloc(newmem,1024,ntdll.dll) |
ntdll.dll ?
Library: User32.lib
DLL: User32.dll
Source:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox
This might be more useful:
| Code: | [ENABLE]
{$lua}
if syntaxcheck then return end
function MessageBox(title,text,uType)
return executeCodeLocalEx("user32.MessageBoxA", MainForm.Handle, text, title, uType)
end
aa1 = MessageBox("The title", "the text", 3)
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
showMessage("select: "..aa1)
|
_________________
|
|
| Back to top |
|
 |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Jul 02, 2024 6:54 am Post subject: |
|
|
| AylinCE wrote: | Do you think the application is correct?
| Code: | | alloc(newmem,1024,ntdll.dll) |
ntdll.dll ?
Library: User32.lib
DLL: User32.dll
Source:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox
This might be more useful:
| Code: | [ENABLE]
{$lua}
if syntaxcheck then return end
function MessageBox(title,text,uType)
return executeCodeLocalEx("user32.MessageBoxA", MainForm.Handle, text, title, uType)
end
aa1 = MessageBox("The title", "the text", 3)
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
showMessage("select: "..aa1)
|
|
Thank you for your reply. First of all, there was no problem when I used cheat engine 7.1 and the older version 6.4, and I could popup normally, but I couldn't use 7.4 and 7.5, I don't know why
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1528
|
Posted: Tue Jul 02, 2024 7:21 am Post subject: |
|
|
Reasons;
In cases related to Cheat Engine:
Development, Update-related changes, additions or changed syntax, etc.
In Windows related cases:
Again, attachments or library contents that have changed, been deprecated, moved to another program, DLL or syntax, etc.
Also, are you sure that "ntdll.dll" still works in 7.1 and 6.+?
You can test the example I gave in any version on 6+.
And whatever the result you want to do or get with this code, I recommend you focus on it and produce a solution.
Remember; Latest versions of CE allow you to use all-encompassing features.
However, older versions exist to use certain features and this certainly does not include updates to Lua syntaxes.
_________________
|
|
| Back to top |
|
 |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Jul 02, 2024 7:43 am Post subject: |
|
|
| AylinCE wrote: | Reasons;
In cases related to Cheat Engine:
Development, Update-related changes, additions or changed syntax, etc.
In Windows related cases:
Again, attachments or library contents that have changed, been deprecated, moved to another program, DLL or syntax, etc.
Also, are you sure that "ntdll.dll" still works in 7.1 and 6.+?
You can test the example I gave in any version on 6+.
And whatever the result you want to do or get with this code, I recommend you focus on it and produce a solution.
Remember; Latest versions of CE allow you to use all-encompassing features.
However, older versions exist to use certain features and this certainly does not include updates to Lua syntaxes. ;) |
Because my requirements need to be allocated on the ntdll address, I remove ntdll: alloc(newmem,1024), this works, but I want to allocate alloc(newmem,1024, ntDl.dll) above the ntdll address and it will not be executed. Yes, all versions except 7.4 and 7.5 seem to work fine
:cry:
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4706
|
Posted: Tue Jul 02, 2024 11:43 am Post subject: |
|
|
If "MessageBoxA" symbol lookup works, try that instead
| Code: | | alloc(newmem,1024,MessageBoxA) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Jul 02, 2024 7:45 pm Post subject: |
|
|
| ParkourPenguin wrote: | If "MessageBoxA" symbol lookup works, try that instead
| Code: | | alloc(newmem,1024,MessageBoxA) |
|
Thank you! He can work normally
|
|
| 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
|
|