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 


[C#] Finding THREADSTACK0 of 64bit game

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
h4ck0ry
How do I cheat?
Reputation: 0

Joined: 12 Jun 2016
Posts: 9

PostPosted: Tue Jun 14, 2016 6:09 pm    Post subject: [C#] Finding THREADSTACK0 of 64bit game Reply with quote

Hey everyone!

Last edited by h4ck0ry on Thu Jun 16, 2016 3:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Tue Jun 14, 2016 8:10 pm    Post subject: Reply with quote

Here is your Problem:

You call the ReadMemory like this in the error part:
ReadProcessMemory(int,IntPtr,uint,int,int)

But the implementation wants this:
ReadProcessMemory(int,long,byte[],int,int)

stackTop needs to be a byte[] buffer not an uint you can convert the bytes after that to uint with the bitconverter.

(tbi.TebBaseAddress + 8).ToUInt64() should doo its work for the other error.

so your code should look like this:

Code:

byte[] buffer = new byte[8];
ReadProcessMemory(p.Id, (tbi.TebBaseAddress + 8).ToUInt64(), buffer, 8, ref x);
//Convert byets to uint for stackTop


Greets Matze

_________________
Back to top
View user's profile Send private message
h4ck0ry
How do I cheat?
Reputation: 0

Joined: 12 Jun 2016
Posts: 9

PostPosted: Tue Jun 14, 2016 11:22 pm    Post subject: Reply with quote

-snip-

Last edited by h4ck0ry on Thu Jun 16, 2016 3:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Wed Jun 15, 2016 7:56 am    Post subject: Reply with quote

Searched the error code and found this:

0xC000000A STATUS_BAD_INITIAL_PC: An invalid initial start address was specified in a call to NtCreateThread.

Something seems wrong with your ThreadInfoClass.

Greets Matze

_________________
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