tdennist
November 10th, 2008, 12:55
Hi,
I'm trying to eliminate a nag screen. It appears once upon opening the application, and then not again. However, I believe I'm being led astray by a non-standard method of window creation.
The program is written in VC++ 6.0, and I've determined via ResourceHacker that the dialog (nag screen) in question is not pre-built.
I've set breakpoints on all (three) calls to CreateWindowExA and watched the lpClassName change in Olly to see if I could catch when the nag screen class shows up. It does not. I know the class name via View->Windows in Olly.
I then set a message bp on the ClassProc of the nag screen for window creation and destruction. The message that breaks when I destroy the nag screen:
Stack snapshot:
(note the class name '#32770' -- that's the nag screen class name. Is this information identifying for the application in any way? If so, I will promptly remove it and replace it with something more generic)
BP (in module USER32):
I don't know if this is any use to me.
Next I set breakpoints on DefWindowProcA calls in the module and watch the hWnd value in Olly until my class name shows up. Sure enough it does this time, only never with a WM_CREATE but with a WM_WINDOWPOSCHANGING. The class name shows up several times with different hWnd values here, always with the same message. Upon completion of the last one, the entire application shows up, along with the nag screen on top of it. So I view the call tree from that DefWindowProcA call and get a call from the main app module. That call looks like:
With the obvious identifying information removed.
My question is...what steps can I take next? I'm not sure how to simply "skip" a call to nag creation if one generic method is used to create/display the window (am I correct about that?) and I can't simply remove the resource because it's created at run-time.
I don't know if I've included enough information in this post to receive help, or if I've posted more than is needed, or if the snippets I posted are the appropriate ones. At any rate, I appreciate any help or pointers passed my way.
If nothing else, the underlying question in all of this is: do I have a legitimate approach? Or, if I don't, what are some key terms or phrases I can use to research in the correct direction?
Thanks!
PS: the nag screen's parent window is of class 'Afx:400000:8:10011:0:1f60463'. What is that?
I'm trying to eliminate a nag screen. It appears once upon opening the application, and then not again. However, I believe I'm being led astray by a non-standard method of window creation.
The program is written in VC++ 6.0, and I've determined via ResourceHacker that the dialog (nag screen) in question is not pre-built.
I've set breakpoints on all (three) calls to CreateWindowExA and watched the lpClassName change in Olly to see if I could catch when the nag screen class shows up. It does not. I know the class name via View->Windows in Olly.
I then set a message bp on the ClassProc of the nag screen for window creation and destruction. The message that breaks when I destroy the nag screen:
Stack snapshot:
Code:
0012F644 7E418734 /CALL to Assumed WinProc from USER32.7E418731
0012F648 007A03B8 |hWnd = 007A03B8 ('UNREGISTERED COPY',class='#32770',parent=042C01F6)
0012F64C 00000002 |Message = WM_DESTROY
0012F650 00000000 |wParam = 0
0012F654 00000000 \lParam = 0
(note the class name '#32770' -- that's the nag screen class name. Is this information identifying for the application in any way? If so, I will promptly remove it and replace it with something more generic)
BP (in module USER32):
Code:
7E43E577 U> 8BFF MOV EDI,EDI
7E43E579 55 PUSH EBP
7E43E57A 8BEC MOV EBP,ESP
7E43E57C 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8] ; USER32.DefDlgProcA
7E43E57F E8 5C9FFDFF CALL USER32.7E4184E0
I don't know if this is any use to me.
Next I set breakpoints on DefWindowProcA calls in the module and watch the hWnd value in Olly until my class name shows up. Sure enough it does this time, only never with a WM_CREATE but with a WM_WINDOWPOSCHANGING. The class name shows up several times with different hWnd values here, always with the same message. Upon completion of the last one, the entire application shows up, along with the nag screen on top of it. So I view the call tree from that DefWindowProcA call and get a call from the main app module. That call looks like:
Code:
004DF3A7 . FF7424 0C PUSH DWORD PTR SS:[ESP+C] ; /Arg1 = 0012F1E8
004DF3AB . 8BC7 MOV EAX,EDI ; |
004DF3AD . 80E4 F0 AND AH,0F0 ; |
004DF3B0 . 8946 64 MOV DWORD PTR DS:[ESI+64],EAX ; |
004DF3B3 . E8 3AD5FFFF CALL appname.004DC8F2 ; \appname.004DC8F2
With the obvious identifying information removed.
My question is...what steps can I take next? I'm not sure how to simply "skip" a call to nag creation if one generic method is used to create/display the window (am I correct about that?) and I can't simply remove the resource because it's created at run-time.
I don't know if I've included enough information in this post to receive help, or if I've posted more than is needed, or if the snippets I posted are the appropriate ones. At any rate, I appreciate any help or pointers passed my way.
If nothing else, the underlying question in all of this is: do I have a legitimate approach? Or, if I don't, what are some key terms or phrases I can use to research in the correct direction?
Thanks!
PS: the nag screen's parent window is of class 'Afx:400000:8:10011:0:1f60463'. What is that?