예제 #1
0
        public Function(State decState, String name, uint addr)
        {
            Name = name;
            Address = addr;
            Size = 0xFFFFFFFF;

            decompiler = decState;
        }
예제 #2
0
 public static State FromFile(String xdp)
 {
     State state = new State();
     state.LoadFromFile(xdp);
     return state;
 }
예제 #3
0
 public XenonInstructions(State state)
 {
     decompiler = state;
 }
예제 #4
0
        private void OpenProject(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
            ofd.Filter = "x360Dec projects (*.xdp)|*.xdp";
            bool? res = ofd.ShowDialog();

            if (res == null || res == false)
                return;

            _FuncCollection.Clear();
            projFn = ofd.FileName;
            state = State.FromFile(projFn);

            foreach (Function f in state.Functions)
            {
                ListViewFunction lvf = new ListViewFunction(f.Name, f.Address, f);
                _FuncCollection.Add(lvf);
                f.ListViewEntry = lvf;
            }

            SaveMenu.IsEnabled = true;
            PdbMenu.IsEnabled = true;

            ListCollectionView view = (ListCollectionView)CollectionViewSource.GetDefaultView(FunctionsView.ItemsSource);
            view.CustomSort = nameSorter;
        }
예제 #5
0
        private void OpenExe(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
            ofd.Filter = "Executable files (*.exe)|*.exe";

            bool? res = ofd.ShowDialog();
            if (res.HasValue && res == true)
            {
                state = new State(ofd.FileName);
                PdbMenu.IsEnabled = true;
                SaveMenu.IsEnabled = true;
            }
        }