francesco149

Silent Aero Glass Reloaded [Works with RC4]

135 posts in this topic

Does not work on RC4.

Please fix.

Looks like bigmuscle renamed MessageBoxW to MessageBoxTimeoutW. Seriously? I'll try to compile my own version.

Testing it now!

Edited by Blackbird256
0

Share this post


Link to post
Share on other sites

Does not work on RC4.

Please fix.

Looks like bigmuscle renamed MessageBoxW to MessageBoxTimeoutW. Seriously? I'll try to compile my own version.

Testing it now!

It's an undocumented winapi, you gotta check the memory and see if the hook still fits and modify the trampoline

http://edn.embarcadero.com/article/32736

0

Share this post


Link to post
Share on other sites

Lol it reminds me of when bigmuscle changed the buttons on his dialog boxes (previews 2 & 3) just because I was autoclicking them with AGTweaker.

Anyway, good job, upgraded my old v0.7 to RC3, and total respect I read your code and hardly understood half of it :angel

0

Share this post


Link to post
Share on other sites

Yes, I changed to MessageBoxTimeout function but reason is completely different than bothering with your stupid cracking. However, if you are so active in cracking other's work, you surely will be able to develop Aero Glass completely on your own and there's no need why I should ever release final version and make public version of Win8.1 Aero Glass :whistle:

0

Share this post


Link to post
Share on other sites

Good thing I won't upgrade to 8.1, because I don't need more metro crap. If they added Start menu back at least I'd consider it.

Does not work on RC4.

Please fix.

Looks like bigmuscle renamed MessageBoxW to MessageBoxTimeoutW. Seriously? I'll try to compile my own version.

Testing it now!

It's an undocumented winapi, you gotta check the memory and see if the hook still fits and modify the trampoline

http://edn.embarcadero.com/article/32736

I looked over the code and it seems to be more complicated than I thought. I don't know much about assembly so this'll be hard.

Edited by Blackbird256
0

Share this post


Link to post
Share on other sites
I looked over the code and it seems to be more complicated than I thought. I don't know much about assembly so this'll be hard.

It shouldn't be hard to pull off. I took a look at MessageBoxTimeoutW and these are the opcodes:

7FF15190638 - FF F3 - push ebx7FF1519063A - 55 - push rbp7FF1519063B - 56 - push rsi7FF1519063C - 57 - push rdi

Warning: code ahead

first of all you need to get the proc address of the new API so replace the func name in the getprocaddress call:

EDIT: fix'd this line

pMessageBoxProc = SafeGetProcAddress(GetModuleHandle(_T("user32.dll")), "MessageBoxTimeoutW");

so you need to replace the trampoline with

BYTE hook::trampoline_MessageBox[] ={    0xFF, 0xF3, // push ebx    0x55, // push rbp    0x56, // push rsi    0x57, // push rdi    0x68, 0x00, 0x00, 0x00, 0x00, // push 00000000 ; low DWORD of the ret address    0xC7, 0x44, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, // mov [rsp+04],00000000 ; high DWORD of the ret address    0xC3 // ret};

then you need to comment out the nops in hook::attach() since we're overwriting 5 bytes now

//*pwNops = 0x9090; // 2 nops to fill the truncated opcode

then you need to fix detach to restore the correct opcodes:

	void hook::detach()	{		LPBYTE pbCleanOpcode1a = reinterpret_cast<LPBYTE>(&trampoline_MessageBox[0]);		LPDWORD pdwCleanOpcode1b = reinterpret_cast<LPDWORD>(reinterpret_cast<LPBYTE>(pbCleanOpcode1a) + 1);		LPBYTE pbOpcode1a = reinterpret_cast<LPBYTE>(pMessageBoxProc);		LPDWORD pdwOpcode1b = reinterpret_cast<LPDWORD>(reinterpret_cast<LPBYTE>(pbOpcode1a) + 1);		// attempt to unhook MessageBox		*pbOpcode1a = *pbCleanOpcode1a;		*pdwOpcode1b = *pdwCleanOpcode1b;		// erase relay function		memset(pbOpcode1a - 15, 0x90, 14);		VirtualFree(pbOpcode1a - 15, 14, MEM_RELEASE);		// TODO: restore old memory protection (optional)		if (*pbOpcode1a != *pbCleanOpcode1a)			hook::pMessageBox(NULL, _T("Failed to un-hook MessageBoxTimeout"), 				appname, MB_OK | MB_ICONWARNING, 0, 0x7FFFFFFF);		pMessageBox = reinterpret_cast<pfnMessageBox>(pMessageBoxProc);	}

Then you need to change the hook function to:

int WINAPI hook::hook_MessageBox(HWND hWnd, LPCWSTR lpText,    LPCWSTR lpCaption, UINT uType,    WORD wLanguageId, DWORD dwMilliseconds){...}

EDIT:

You also need to change the typedef in hook.hpp:

		typedef int (WINAPI *pfnMessageBox)(_In_ HWND hWnd, _In_ LPCTSTR lpText, 			_In_ LPCTSTR lpCaption, _In_ UINT uType, _In_ WORD wLanguageId, _In_ DWORD dwMilliseconds);

and of course change the hook prototype in hook.hpp as well:

		static int WINAPI hook_MessageBox(_In_ HWND hWnd, _In_ LPCTSTR lpText, 			_In_ LPCTSTR lpCaption, _In_ UINT uType, _In_ WORD wLanguageId, _In_ DWORD dwMilliseconds);

You also need to change the trampoline offsets in hook()

		LPDWORD pdwTrampolineRetAddressLow = reinterpret_cast<LPDWORD>(&trampoline_MessageBox[6]);		LPDWORD pdwTrampolineRetAddressHigh = reinterpret_cast<LPDWORD>(&trampoline_MessageBox[14]); 

Also, the return address is now different:

pMessageBoxReturn = reinterpret_cast<LPVOID>(reinterpret_cast<LPBYTE>(hook::pMessageBox) + 5);

Also we need to only make 5 bytes writable now (and add the two extra parameters to each messagebox call as demonstrated here):

		if (!VirtualProtect(pbOpcode, 5, PAGE_EXECUTE_READWRITE, &dwOldProtect))		{			hook::pMessageBox(NULL, _T("Failed to make MessageBoxTimeout writable"), appname, MB_OK | MB_ICONWARNING, 0, 0x7FFFFFFF);			return;		} 

I think that's about it, this is just a quick analysis, I haven't tested any of this but I'm quite sure it will work

Edited by francesco149
0

Share this post


Link to post
Share on other sites

I don't think discussing a crack in the Same Forum to circumvent the pop-up is fair to all the hard work that BigMuscle has done.

There is a discussion already over at MDL over 450 posts on Aero Glass... why don't you take it over there just not here?

DP

0

Share this post


Link to post
Share on other sites

I don't think discussing a crack in the Same Forum to circumvent the pop-up is fair to all the hard work that BigMuscle has done.

There is a discussion already over at MDL over 450 posts on Aero Glass... why don't you take it over there just not here?

DP

+1

0

Share this post


Link to post
Share on other sites

+2

i am one of those that moaned about the popup but its gone away - or has in my mind - the plusses of aero far outweigh the popup which seems less and less intrusive

i might even miss it when we get the final version :angel

0

Share this post


Link to post
Share on other sites

+2

i am one of those that moaned about the popup but its gone away - or has in my mind - the plusses of aero far outweigh the popup which seems less and less intrusive

i might even miss it when we get the final version :angel

Not when you're playing quake 3 arena and it pops up when you're trying to get some frags done

Edited by francesco149
0

Share this post


Link to post
Share on other sites

+2

i am one of those that moaned about the popup but its gone away - or has in my mind - the plusses of aero far outweigh the popup which seems less and less intrusive

i might even miss it when we get the final version :angel

Not when you're playing quake 3 arena and it pops up when you're trying to get some frags done

The Game issue has already been discussed many times on here, that's why I made a Toggle Aero with my installer so you can quickly toggle off aero when going to "Game mode" then toggle aero back on when done...DP

Edited by DosProbie
0

Share this post


Link to post
Share on other sites

+2

i am one of those that moaned about the popup but its gone away - or has in my mind - the plusses of aero far outweigh the popup which seems less and less intrusive

i might even miss it when we get the final version :angel

Not when you're playing quake 3 arena and it pops up when you're trying to get some frags done

The Game issue has already been discussed many times on here, that's why I made a Toggle Aero with my installer so you can quickly toggle off aero when going to "Game mode" then toggle aero back on when done...DP

That would make more sense. Why would you want Aero enabled if you can't even see it?

0

Share this post


Link to post
Share on other sites

I must admit that this whole thing is a bit funny. The real reason why I added this messagebox was just an experiment to test users how they behaves if they get something for free. And you can see something weird which I haven't mentioned yet:

a) users are complaining about half-an-hour/once-an-hour messagebox, but the period between each popup is not half an hour and it's not either once an hour. The period is much much longer.

b) request to display messagebox is sent during the request to draw glass frame. And these requests don't come when desktop is not visible - e.g. you are playing the game etc.

Isn't it weird that users complain about something which doesn't exist in real?

0

Share this post


Link to post
Share on other sites

I must admit that this whole thing is a bit funny. The real reason why I added this messagebox was just an experiment to test users how they behaves if they get something for free. And you can see something weird which I haven't mentioned yet:

a) users are complaining about half-an-hour/once-an-hour messagebox, but the period between each popup is not half an hour and it's not either once an hour. The period is much much longer.

B) request to display messagebox is sent during the request to draw glass frame. And these requests don't come when desktop is not visible - e.g. you are playing the game etc.

Isn't it weird that users complain about something which doesn't exist in real?

Yep sure is mate, I thought it was strange that the message box sometimes didn't show for a very long period of time, anyway it has never bothered me, I did add the option in the RC3 installer to disable glass but I took it out of the RC4 installer and also though about removing AGTweaker but it served a function purpose to change the theme resource, but that is all, mainly I just wanted to create a fool proof installer so you didn't get constant people complaining that they couldn't get it to work and to get a larger test ordiance to report any problems.

Edited by MrGRiM
0

Share this post


Link to post
Share on other sites

I don't approve of this myself, but I don't really disapprove of it either. I know users removing the message box is your pet peeve, bigmuscle, but we're pretty close to a stable from what you've said. Most users are not known for being all too patient, myself included. I even installed this. Both are open source, so it should be all good. Nobody is going to discredit you, remove your copyright or licenses with this. As long as someone doesn't put malware in it and post it to a warez site, this late in the game it isn't too big of a deal. Plus, better to get it from MSFN that some shady backdoor infested site. :yes: Just grant the impatient a reprieve this late in the game. If bugs prop up, error, hell if someone's computer explodes due to them forking it, it's not your fault. So have no worries. Besides, you are a developer now (I don't know if you professionally develop for companies) but developers tend to have a lot more patience. But even for me that message box got a bit on my nerves. Not at first but when you game a bit on Steam, you're in a zombie-infested barn in HL2:Episode 2 and you have zombies charging at you and the message box steals focus from the game, it's a bit unnerving to say the least. Not all games will pause automatically, either, like Half Life did for me. In fact, a long time ago if a message box like this popped up I would be cursing in my head. Aaah first world problems. :)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.