Exemplo n.º 1
0
        public Function(State decState, String name, uint addr)
        {
            Name = name;
            Address = addr;
            Size = 0xFFFFFFFF;

            decompiler = decState;
        }
Exemplo n.º 2
0
 public static State FromFile(String xdp)
 {
     State state = new State();
     state.LoadFromFile(xdp);
     return state;
 }
Exemplo n.º 3
0
 public XenonInstructions(State state)
 {
     decompiler = state;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
            }
        }