How to subscribe to predispatch of registration in Shopware 6 just like shopware 5?

I want to call a function right before the registration process starts in order to check some values from the registration form. In Shopware 5 I would use a predispatch event for that. How to do that in Shopware 6?