If she's legally in the country, you would marry then petition to adjust her status. Once that petition is filed she should not leave the country unless she first obtains 'advance parole', as overstay beyond the end of her visa could trigger a period of inelgibility to reenter the United States.