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 


Compatibilities

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

Joined: 28 Feb 2007
Posts: 44

PostPosted: Fri May 28, 2010 7:12 pm    Post subject: Compatibilities Reply with quote

G00d day t0 all.
First 0f all. I w0uld like t0 ap0l0gize f0r my Letter 0.
My keyb0ard has been br0ken just yesterday, s0 please bear with my 0.

@T0pic.

I have a pr0blem regarding c0mpatibilities I think?
I c0ded a dll and an inject0r 0n a wind0ws vista.

I tried it and the c0de g0es sm00thly.

Next I tried it 0n my 0ther PC (wind0ws XP SP2).

It didn't w0rk..
Giving me headaches.

Please help give me ideas 0n whats g0ing 0n.



---


Edit :

S0 I c0nfirmed it.
c0de 0n xp is w0rking t00.

But when I change an address, it terminates. ~.~
D0es T0ken Privilege will d0 it?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Fri May 28, 2010 9:03 pm    Post subject: Reply with quote

check for installed anti virus tools and that you are running as administrator. (the default administrator is NOT an administrator)

as for the crash when you change an address:
1: Make sure the address actually exists
2: Make sure the memory is writable (virtualprotect)
3: type alt+111

_________________
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
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Fri May 28, 2010 11:03 pm    Post subject: Reply with quote

Dark Byte wrote:
check for installed anti virus tools and that you are running as administrator. (the default administrator is NOT an administrator)

as for the crash when you change an address:
1: Make sure the address actually exists
2: Make sure the memory is writable (virtualprotect)
3: type alt+111


Thanks f0r the reply DB.

I disabled antivirus for the testing purpose.

The address exist and it is a static address.

The address protect is ReadExecute.

Code:


VirtualProtect((LPVOID)0x0080CC0C,0x4000,PAGE_READWRITE,&rawr);

               *(DWORD*)0x0080CC0C = 0;

               Sleep(100);

               *(DWORD*)0x0080CC0C = 1065185444;

               VirtualProtect((LPVOID)0x0082CC0C,0x4000,rawr,NULL);


The third is : Sorry for the annoying 0 Very Happy

and this still crashes the process.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Fri May 28, 2010 11:30 pm    Post subject: Reply with quote

The last parameter of VirutalProtect cannot be null.
Back to top
View user's profile Send private message
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Sat May 29, 2010 7:46 am    Post subject: Reply with quote

Help anyone. I'll state the problem as clear as I can.

This is my Address : 0x0080CC0C

I want to edit that address.

This is the Address's Property :

Viewed from CE.

00401000 Execute+Write Copy Commit Execute+Read Image 45F000

00860000 Execute+Write Copy Commit Read+Write Image 553000

------

I tried this

Code:
             VirtualProtect((LPVOID)0x0080CC0C,0x4000,PAGE_READWRITE,&rawr);

               *(DWORD*)0x0080CC0C = 0;

               Sleep(100);

               *(DWORD*)0x0080CC0C = 1065185444;

               VirtualProtect((LPVOID)0x0080CC0C,0x4000,rawr,0);



But VirtualProtect keeps on failing, so as soon as I write it crashes.

Please clear some important things to me.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat May 29, 2010 4:23 pm    Post subject: Reply with quote

read the post above yours.

NULL is 0
0 is NULL
Back to top
View user's profile Send private message
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Sat May 29, 2010 6:23 pm    Post subject: Reply with quote

the program crashes after the 2nd VP.

The first VP returns me a 0, but the Page Protection is Execute_Read.
After failing, it starts to write and this is where the crash happens.

Why am I failing at first VP,
and what solution I can do if VP return me a false value.

Thanks and GoodDay.. Hope you all bear with me. Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat May 29, 2010 6:45 pm    Post subject: Reply with quote

for some unknown reason ,that no-one seems to be able to explain, is that VirtualProtect is writing to address 0x00000000
Perhaps you've specific a 0 or null pointer somewhere that you shouldn't have ?

_________________
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
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Sat May 29, 2010 7:07 pm    Post subject: Reply with quote

well I think I have put this.

DWORD rawr,ads = 0,x,y;

I have already make this running on vista.

Please listen to my little story.

I code this on my XP.
since my laptop cannot run the game, I run it on my PC with vista.
The dll was flawless.

Then I tried it to port at XP which is on another PC.
It crashes. So I tried to do some investigations.
I put MessageBoxes to know whats happening.

at my Vista, I tried this

Code:

VirtualProtect((LPVOID)0x0080CC0C,4,PAGE_READWRITE,&rawr);

               sprintf(text,"Page Protection : %i",rawr);
               MessageBoxA(0,text,"Info",NULL);

I'm trying to read the old protection.
From here I am getting a '32' on my messagebox which is PAGE_EXECUTE_READ.

I tried the same code at winXP.
It return me 0.

Same as win7.

It seems I can't change VPs on other PC, or much worst even virtualquery doesn't work. Even reading gives 0 at xp.

I can post my source code if you require it. Please help me solve this problem.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat May 29, 2010 7:13 pm    Post subject: Reply with quote

'rawr' will have the value representing the protection of the page before you changed it. Are you certain the address is the same between operating systems?
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sat May 29, 2010 7:53 pm    Post subject: Reply with quote

Code:

// iPromise

// don't you need to add a module + offset to get your address?

DWORD Address = 0x0080CC0C;

__try
{
   DWORD lpflOldProtect;

   VirtualProtect((LPVOID) Address, 4, PAGE_READWRITE, &lpflOldProtect);

   DWORD Value = *(DWORD*) Address;

   *(DWORD*) Address = 1065185444;

   VirtualProtect((LPVOID) Address, 4, lpflOldProtect, &lpflOldProtect);
}
__except (true)
{
   MessageBoxA(0, "ERROR", "FAILED TO EDIT MEMORY", MB_OK);
}
Back to top
View user's profile Send private message MSN Messenger
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Sat May 29, 2010 8:41 pm    Post subject: Reply with quote

yes, rawr is the oldprotection ..

static addresses from a process is still static..


Edit - Thank f0r the help! I did it.

Used VirtualQuery and VirtualProtect Very Happy: P


EDIT - Important Please Read.

When I make my page as

PAGE_EXECUTE_READWRITE - the code somewhere replaces it as
EXECUTE WRITE COPY.

When I use PAGE_READWRITE - the code turns into
WRITE COPY..

Anyone have idea?
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sat May 29, 2010 9:43 pm    Post subject: Reply with quote

put it in a loop, the game is probably changing the protection.
Back to top
View user's profile Send private message MSN Messenger
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Sat May 29, 2010 11:52 pm    Post subject: Reply with quote

iPromise wrote:
put it in a loop, the game is probably changing the protection.


Doesn't work Very Happy
Seems like a bad bad bad bad thing.
Back to top
View user's profile Send private message
blitz02
Cheater
Reputation: 0

Joined: 28 Feb 2007
Posts: 44

PostPosted: Tue Jun 01, 2010 2:04 am    Post subject: Reply with quote

Found the faulty thing.
It was hooked by gameguard.

I used iPromise's method.

Thanks.
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