Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is createthread used to repeatedly call call invalid?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Thu Oct 08, 2020 6:49 am    Post subject: Is createthread used to repeatedly call call invalid? Reply with quote

Code:


[enable]

Globalalloc(keybd_zw,50)
Label(keybd_zw_f)
CreateThread(keybd_zw)
RegisterSymbol(keybd_zw_f)

keybd_zw:

pushad
popfd

push 1
call sleep

push 0
push 0
push 11
push #87
call USER32.keybd_event
push 0
push 2
push 11
push #87
call USER32.keybd_event

popfd
popad

cmp byte ptr [keybd_zw_f],1
jne keybd_zw

ret

keybd_zw_f:
db 0



[disable]

keybd_zw_f:
db 1





Automatically press w repeatedly, but the program will crash when writing in this way, help me!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25840
Location: The netherlands

PostPosted: Thu Oct 08, 2020 7:43 am    Post subject: Reply with quote

is the target 32-bit or 64-bit ?
_________________
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
View user's profile Send private message MSN Messenger
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Thu Oct 08, 2020 7:46 am    Post subject: Reply with quote

Dark Byte wrote:
is the target 32-bit or 64-bit ?


32 bi. When calling call, you need to bring ret. However, createthread also needs ret. Do the two conflict?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Thu Oct 08, 2020 10:13 am    Post subject: Reply with quote

Code:
pushad
popfd

You're pushing general purpose registers and popping them into the EFLAGS register.

You don't need to push or pop any non-volatile registers. Get rid of the push/pop ad/fd instructions.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites