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 


Help to find a address please...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kot1990
Expert Cheater
Reputation: 1

Joined: 06 Sep 2009
Posts: 131
Location: Greece

PostPosted: Sun Nov 29, 2009 1:06 pm    Post subject: Help to find a address please... Reply with quote

hello, I have an issue with finding an address in a client program. The client is connected on a server and if the client is connected it displays the string "connected", otherwise it displays "No Connection". I found those strings in the executable with CE. Then I found what accesses that address of the string and it shows 3 asm instructions (probably it is windows api, the display function) but I don't need how the string is displayed. I want to access what makes this string display, what calls the display function and giving the string parameter. Like:

If (conn == 0) //I need the conn!!!
display("No Connection");

else
display("Active");

Please help!!
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Nov 29, 2009 1:16 pm    Post subject: Reply with quote

Look for a reference to the string. Most likely somewhere there is an instruction such as :
push x

where x is a pointer to the string. The code above that will be what you are looking for
Back to top
View user's profile Send private message
kot1990
Expert Cheater
Reputation: 1

Joined: 06 Sep 2009
Posts: 131
Location: Greece

PostPosted: Sun Nov 29, 2009 1:26 pm    Post subject: Reply with quote

I found that the function called is named RtlUnicodeToMultiByteN, how can I find what called that function? I found that the function is indise module ntdll. I didn't find any push but there is a reference like mov ebx, [eax +12] eax + 12 <-- this one has the address of the string being shown. It seems that the program is starting at 0x00400000 , but when debugging the only addresses I find in the registers at calling moment are below 0x00400000, I think that I cannot find what called that function, please help Sad . I cannot use a debugger like olly or w32dasm because it seems the exe is something like encrypted and I can't see any instruction or imports there, so the only way is on run time. I need instruction how to find the caller with CE.

Edit: Because the program is a kind of a package of some encryption, is there a way to copy the binary from memory on run time and save it to executable file???
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Nov 30, 2009 6:33 am    Post subject: Reply with quote

Maybe WideCharToMultiByte() ?

http://msdn.microsoft.com/en-us/library/cc500362.aspx

Or look on the stack at return addresses
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Nov 30, 2009 12:45 pm    Post subject: Reply with quote

kot1990 wrote:
Edit: Because the program is a kind of a package of some encryption, is there a way to copy the binary from memory on run time and save it to executable file???
It's called unpacking. Find the name of the packer and Google for tutorials.
Back to top
View user's profile Send private message
kot1990
Expert Cheater
Reputation: 1

Joined: 06 Sep 2009
Posts: 131
Location: Greece

PostPosted: Mon Nov 30, 2009 9:00 pm    Post subject: Reply with quote

Well I found another solution. I want to create a code cave and check if the value of the register points to the "No connection" string. The moment the client accesses the "No connection" string after unknown execution, the eax register contains the starting address of the string. I know how to create the code cave but not clearly understand what to write. I think I need a condition jump, jump if equal something like this. I need to check if eax contains the address of "No connection" and if its true then write on a byte the value 1... like in my position:

if (eax == 004A3352)
{
write the value 0x01 to the byte located at 003F0010.
}

with that byte enabled I will ReadProccessMemory() from my external program to check if there is "No connection".Of course I will WriteProccessMemory() the cove cave itself first. Oh and I need a little help to allocate a little unused by the client memory to create the code cave in, I don't know any functions, maybe AllocateProccessMemory() have no idea xD. If there's a better way please tell me, I have spent more than 20 hours to find what causes eax to take that value but with no luck. I stuck on an interrupt like this one
int 2b while debugging and after that I couldn't see anything executing, and eax magically turned to that address. Thx. Smile

Edit: LOL I found an easier way. I guessed that the client has already somewhere this value as a boolean. I connected disconnected 5-6 times the client and searched in memory till only 4 values remained. These 4 bytes turned to 1 when there was a connection and to 0 when there was no connection. I tried that up to 20 times and that's true Smile LOL LOL LOL again!! Solved Cool
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 programming 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