The document presents a reverse engineering approach and tool called REGUI to generate a formal model from a graphical user interface (GUI) application. The approach uses static and dynamic analysis to extract structural information, navigation steps, and behavior from the GUI. It involves three phases: 1) automatically exploring the GUI to obtain structural information and navigation steps, 2) inferring dependencies between GUI elements, and 3) generating a Spec# model representing the GUI. A case study of applying the approach to a notepad application is also presented. The tool aims to reduce the effort required to construct GUI models for testing purposes.