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 


CreateThread, ret -> crash(SC2)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Aug 09, 2014 4:33 pm    Post subject: CreateThread, ret -> crash(SC2) Reply with quote

The code bellow crashes when try it on Starcraft 2, but it seems to work fine on other applications.

Code:

[ENABLE]
alloc(myThread,256)
createThread(myThread)

label(control)
registersymbol(control)

myThread:
  push #500 // duration
  push #100 // frequency
  call Beep

  push #500 // ms
  call Sleep

  dec dword ptr [control]
  jg myThread
  ret

control:
  dd 4

[DISABLE]
control:
  dd 0


The game crashes when reaches the "ret" instruction. I hear the beep 4 time and then the game crashes.

Any idea why? I assume it has something to do with the collection of dead threads that SC2 does.

All ideas are welcome, thanks in advance.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sat Aug 09, 2014 6:25 pm    Post subject: Reply with quote

You may wish to specify the module the function is in. E.g. kernel32.Beep

Perhaps another module is loaded that wraps Beep in a cdecl calling convention

_________________
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
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Aug 09, 2014 6:36 pm    Post subject: Reply with quote

Dark Byte wrote:
You may wish to specify the module the function is in. E.g. kernel32.Beep

Perhaps another module is loaded that wraps Beep in a cdecl calling convention


That was the problem. Thanks a lot!Very Happy
Back to top
View user's profile Send private message
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