Swipe up/down on window top to maximize/resize to default size
Update: I find the app! It is HyperDock. There is a feature in the window management: Scroll a window's title to snap &amp; change space and that's it!



An alternative way is using Better Touch Tool: 
I set Command as the modifier key and touch gestures same as the question description. As Better Touch Tool doesn't seem to have the option like "triggering the gesture when the cursor touches the empty spot of the window", it will conflict with the default scrolling up and down easily if you don't add a modifier key...