In the construction of the singleton WinMouseProducer the function registerWMPHandler (sub_405ACB) gets called. First parameter is ignored, second is a ptr to a function, third is the bitmask for the mouse-events this handler handles.
registerWMPHandler stores the callback and the bitmask inside a 10-element structure wmpCallbacks. When more than 10 handlers are registered, the new handler is dropped! The unused deregisterWMPHandler (sub_405B02) sets the used flag of the specified handler to zero, therefore disabling it.
In VSHELL, only one handler, WinMouseProducer::handleEvent with bitmask 0x1F (31), gets registered.
When in MainWndProc a mouse-related message is handled, handleMouseMsg (sub_405BFC) is called with following parameters: