Log in

View Full Version : Reversing (Finding WndProc)


SilSaLaMaTa
August 22nd, 2002, 15:52
Hi,
How can I find WndProc of a window ?
I'm tring to reverse Yahoo! Messenger , I want to add a button for voice button . I want the talk button always pressed without checking "Hand Free" .
I tried Bmsg and a spent a lot of time , but i didn't find out where Yahoo! Messenger pass the code to the DLL (Yacsui.dll I think). Can anyone help me plz?

Fake51
August 22nd, 2002, 16:47
Lol, finding the wndproc is usually rather easy. This is because all windows receive many different messages, and there's no reason to handle all of them yourself. So the idea is: look for DefWindowProcA and start tracing backwards thru the program flow. You should soon see something like

cmp eax,111h
je somewhere
or
cmp [ebp+??],111h
je somewhere
or
sub eax,100h
je somewhere
dec eax
je somewhere
sub eax,somemore
je somewhere

That's the typical way of checking for messages, and should tip you off.

Fake

SilSaLaMaTa
August 22nd, 2002, 18:30
Hi,
Didn't help . I found the "cmp eax,yyy" and the jumps, eax was the message , but eax was never == 201 (WM_LBUTTONDOWN) .

ZaiRoN
August 22nd, 2002, 18:56
hi SilSaLaMaTa,
the message WM_LBUTTONDOWN not necessarily must be in the wndproc.
if you don't find it, then it means that the proggie doesn't use it.
you can try with the generic wm_command and then try to look for wParam value...

bye,
ZaiRoN

DakienDX
August 22nd, 2002, 19:01
Hello SilSaLaMaTa !

One other try might be to open the application in a Resource Editor, find the ID of the button and break on "EAX=WM_COMMAND" with the high word of "wParam" = BN_CLICKED and the low word of "wParam" = ButtonID. (lParam shouldn't be 0)

SilSaLaMaTa
August 23rd, 2002, 10:46
Hi !
Understood
Thanx alot
Now I should Work on adding the function .