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 


(Solved!)this hack not work

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

Joined: 17 Aug 2016
Posts: 8
Location: dddd

PostPosted: Tue Aug 23, 2016 5:58 am    Post subject: (Solved!)this hack not work Reply with quote

this works:
Code:

 const char* stringg = "exit";
DWORD execute()
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[0x0055011]
   }
}
int main()
{
execute();
return true;}

but this one not work:
Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x0055011
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}

why??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Question Question Question Question Question Question [/code]

_________________
ddddd


Last edited by Yu-Haxxx on Tue Aug 23, 2016 4:56 pm; edited 3 times in total
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Aug 23, 2016 6:10 am    Post subject: Reply with quote

Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem.
Back to top
View user's profile Send private message
Yu-Haxxx
How do I cheat?
Reputation: 0

Joined: 17 Aug 2016
Posts: 8
Location: dddd

PostPosted: Tue Aug 23, 2016 6:29 am    Post subject: Reply with quote

ulysse3131 wrote:
Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem.

i mean like this:
this works:
Code:

 const char* stringg = "exit";
DWORD execute()
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[0x0055011]
   }
}
int main()
{
execute();
return true;}

but this one not work:
Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x0055011
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}

_________________
ddddd
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Aug 23, 2016 6:45 am    Post subject: Reply with quote

Yu-Haxxx wrote:
ulysse3131 wrote:
Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem.

i mean like this:
this works:
Code:

 const char* stringg = "exit";
DWORD execute()
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[0x0055011]
   }
}
int main()
{
execute();
return true;}

but this one not work:
Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x0055011
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}


So that's like I said, the arguement HERE has the wrong value when the function is called.
When it works, the value that matters is 0x0055011.
You replace this value by HERE, you initialize here with 0 and you never assign 0x0055011 to HERE therefore your code does not work.
Aside from that, while returning true to an int compiles, it's bad style, returns 1 is better.
Also, you should have a compile time error because
Code:
execute(DWORD eee);

is not valid c++. Replace by
Code:
execute(eee);


This is what should work :



Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x0055011;
execute( eee);
return 1;}

Edit :
I hadn't looked the whole thing closely enough, there was also a missunderstanding on how your arguments mix together. fixed it.
Back to top
View user's profile Send private message
Yu-Haxxx
How do I cheat?
Reputation: 0

Joined: 17 Aug 2016
Posts: 8
Location: dddd

PostPosted: Tue Aug 23, 2016 7:32 am    Post subject: Reply with quote

ulysse3131 wrote:
Yu-Haxxx wrote:
ulysse3131 wrote:
Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem.

i mean like this:
this works:
Code:

 const char* stringg = "exit";
DWORD execute()
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[0x0055011]
   }
}
int main()
{
execute();
return true;}

but this one not work:
Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x0055011
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}


So that's like I said, the arguement HERE has the wrong value when the function is called.
When it works, the value that matters is 0x0055011.
You replace this value by HERE, you initialize here with 0 and you never assign 0x0055011 to HERE therefore your code does not work.
Aside from that, while returning true to an int compiles, it's bad style, returns 1 is better.
Also, you should have a compile time error because
Code:
execute(DWORD eee);

is not valid c++. Replace by
Code:
execute(eee);


This is what should work :



Code:
const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
   __asm
   {
push stringg
push 0x00
call dword ptr ds:[HERE]
   }
}
int main()
{
DWORD eee = 0x0055011;
execute( eee);
return 1;}

Edit :
I hadn't looked the whole thing closely enough, there was also a missunderstanding on how your arguments mix together. fixed it.

it's give crash!

full code:
Code:

 DWORD execute(DWORD HERE )
{
   __asm
   {
push command
push 0x00
call dword ptr ds:[HERE]
   }
}
DWORD WINAPI Watek( LPVOID )
{
/////////
   while(1)
   {
              DWORD HERE = 0x0055011;
          execute(HERE);   
          Sleep(300);
   }
        return 1;
}
int  DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
        if(DLL_PROCESS_ATTACH== _Reason)
        {
              CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
        }
 
        return 1;
}

_________________
ddddd
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Aug 23, 2016 8:41 am    Post subject: Reply with quote

what's up with command ?
1/ you don't provide definition of command so it cannot be full code.
2/ it used to be :
const char* stringg = "exit";
Back to top
View user's profile Send private message
Yu-Haxxx
How do I cheat?
Reputation: 0

Joined: 17 Aug 2016
Posts: 8
Location: dddd

PostPosted: Tue Aug 23, 2016 9:23 am    Post subject: Reply with quote

ulysse3131 wrote:
what's up with command ?
1/ you don't provide definition of command so it cannot be full code.
2/ it used to be :
const char* stringg = "exit";

its the same
const char* command = "exit"
it's still not work Why?

_________________
ddddd
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Aug 23, 2016 9:39 am    Post subject: Reply with quote

You say that this :
Code:
 DWORD execute(DWORD HERE )
{
   __asm
   {
push command
push 0x00
call dword ptr ds:[HERE]
   }
}
DWORD WINAPI Watek( LPVOID )
{
/////////
   while(1)
   {
              DWORD HERE = 0x0055011;
          execute(HERE);   
          Sleep(300);
   }
        return 1;
}
int  DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
        if(DLL_PROCESS_ATTACH== _Reason)
        {
              CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
        }
 
        return 1;
}

gives crash but that this :

Quote:
DWORD execute()
{
__asm
{
push command
push 0x00
call dword ptr ds:[0x0055011]
}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
while(1)
{
execute();
Sleep(300);
}
return 1;
}
int DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
if(DLL_PROCESS_ATTACH== _Reason)
{
CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
}

return 1;
}

works good ? (last code is supposedly your original working code)
Back to top
View user's profile Send private message
Yu-Haxxx
How do I cheat?
Reputation: 0

Joined: 17 Aug 2016
Posts: 8
Location: dddd

PostPosted: Tue Aug 23, 2016 11:27 am    Post subject: Reply with quote

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