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 


creathethread

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

Joined: 27 Dec 2010
Posts: 32

PostPosted: Wed Mar 19, 2014 9:33 pm    Post subject: creathethread Reply with quote

Yeah, theres function in AutoAssemble createthread, but is there function like break/close/remove thread?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Mar 20, 2014 12:03 am    Post subject: Reply with quote

You can make a call to 'TerminateThread' yourself via the AutoAssembler.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686717(v=vs.85).aspx

It expects the thread handle and an exit code (which can just be 0.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Demolish
Cheater
Reputation: 0

Joined: 27 Dec 2010
Posts: 32

PostPosted: Thu Mar 20, 2014 10:22 am    Post subject: Reply with quote

But then i have to call function CreateThread of WinAPI to get my threadID and my create thread function that I would have to run with createthread of autoassembly which makes no sense Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu Mar 20, 2014 12:47 pm    Post subject: Reply with quote

just call exitthread from a code injection
_________________
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
Demolish
Cheater
Reputation: 0

Joined: 27 Dec 2010
Posts: 32

PostPosted: Thu Mar 20, 2014 8:31 pm    Post subject: Reply with quote

Code:
[ENABLE]
registersymbol(newcode)
alloc(newcode,2000)
createthread(newcode)

newcode:
push #1000
call Sleep
add [mm8.exe+7215D4],#100
jmp newcode

[DISABLE]
//dealloc?
newcode:
ret


the thing is that I can't dealloc memory or it will crash and it's the only one problem, any suggestions? :/
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu Mar 20, 2014 8:53 pm    Post subject: This post has 1 review(s) Reply with quote

Use globalalloc instead of alloc and in the disable part just write a variable address that your loop checks if it should end or not
_________________
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
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Mar 21, 2014 5:36 am    Post subject: Reply with quote

Code:
[ENABLE]
createthread(newCode)

globalalloc(newCode,$1000)
label(loop)
label(keepRunning)
registersymbol(keepRunning)


newCode:
push ebp
mov ebp,esp

loop:

...
...your stuff
...

test [keepRunning],01
jnz loop

leave
ret

keepRunning:
dd 1

[DISABLE]

keepRunning:
dd 0

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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