Decompile window_map_scrollpaint() and fix window_map_mouseup()

Not sure if preserving the top g1_element is of any importance, I haven't noticed anything breaking if I remove it.