Exemplo n.º 1
0
        private void pointer_finder_worker_DoWork(object sender, DoWorkEventArgs e)
        {
            pointer_finder_worker.ReportProgress(0);
            for (int section_idx = 0; section_idx < processManager.MappedSectionList.Count; ++section_idx)
            {
                if (pointer_finder_worker.CancellationPending)
                {
                    break;
                }
                MappedSection mappedSection = processManager.MappedSectionList[section_idx];
                if (mappedSection.Name.StartsWith("libSce"))
                {
                    continue;
                }
                mappedSection.PointerSearchInit(processManager, MemoryHelper, pointerList);
                pointer_finder_worker.ReportProgress((int)(((float)section_idx / processManager.MappedSectionList.Count) * 80));
            }

            if (pointer_finder_worker.CancellationPending)
            {
                return;
            }

            pointer_finder_worker.ReportProgress(80);
            pointerList.Init();
            pointer_finder_worker.ReportProgress(90);

            PointerFinderWorkerArgs pointerFinderWorkerArgs = (PointerFinderWorkerArgs)e.Argument;

            pointerList.FindPointerList(pointerFinderWorkerArgs.Address, pointerFinderWorkerArgs.Range);
            pointer_finder_worker.ReportProgress(100);
        }
Exemplo n.º 2
0
        private void next_pointer_finder_worker_DoWork(object sender, DoWorkEventArgs e)
        {
            PointerFinderWorkerArgs pointerFinderWorkerArgs = (PointerFinderWorkerArgs)e.Argument;

            result_counter = 0;
            pointerList.Clear();
            next_pointer_finder_worker.ReportProgress(0);
            for (int section_idx = 0; section_idx < processManager.MappedSectionList.Count; ++section_idx)
            {
                if (next_pointer_finder_worker.CancellationPending)
                {
                    break;
                }
                if (isFastNextScanBox.Checked && mappedSections.Count > 0 && !mappedSections.Contains(section_idx))
                {
                    continue;
                }

                MappedSection mappedSection = processManager.MappedSectionList[section_idx];
                if (isFilterBox.Checked && Util.SectionIsFilter(mappedSection.Name))
                {
                    continue;
                }
                if (!isFilterBox.Checked && mappedSection.Name.StartsWith("libSce"))
                {
                    continue;
                }
                mappedSection.PointerSearchInit(processManager, MemoryHelper, pointerList);
                next_pointer_finder_worker.ReportProgress((int)(((float)section_idx / processManager.MappedSectionList.Count) * 65),
                                                          "Init scanning pointer..." + pointerList.Count + " (" + (section_idx + 1) + "/" + processManager.MappedSectionList.Count + "), " + mappedSection.ToString());
            }

            if (next_pointer_finder_worker.CancellationPending)
            {
                return;
            }

            next_pointer_finder_worker.ReportProgress(65);
            pointerList.Init();
            next_pointer_finder_worker.ReportProgress(70);

            NextFinderEvent?.Invoke(pointerList, pointerFinderWorkerArgs);
        }
Exemplo n.º 3
0
        private void pointer_finder_worker_DoWork(object sender, DoWorkEventArgs e)
        {
            pointer_finder_worker.ReportProgress(0);
            for (int section_idx = 0; section_idx < processManager.MappedSectionList.Count; ++section_idx)
            {
                if (pointer_finder_worker.CancellationPending)
                {
                    break;
                }
                MappedSection mappedSection = processManager.MappedSectionList[section_idx];
                if (isFilterBox.Checked && Util.SectionIsFilter(mappedSection.Name))
                {
                    continue;
                }
                if (!isFilterBox.Checked && mappedSection.Name.StartsWith("libSce"))
                {
                    continue;
                }
                mappedSection.PointerSearchInit(processManager, MemoryHelper, pointerList);
                pointer_finder_worker.ReportProgress((int)(((float)section_idx / processManager.MappedSectionList.Count) * 80),
                                                     "Init scanning pointer..." + pointerList.Count + " (" + (section_idx + 1) + "/" + processManager.MappedSectionList.Count + "), " + mappedSection.ToString());
            }

            if (pointer_finder_worker.CancellationPending)
            {
                return;
            }

            pointer_finder_worker.ReportProgress(80);
            pointerList.Init();
            pointer_finder_worker.ReportProgress(90);

            PointerFinderWorkerArgs pointerFinderWorkerArgs = (PointerFinderWorkerArgs)e.Argument;

            pointerList.FindPointerList(pointerFinderWorkerArgs.Address, pointerFinderWorkerArgs.Range);
            pointer_finder_worker.ReportProgress(100);
        }
Exemplo n.º 4
0
        private void next_pointer_finder_worker_DoWork(object sender, DoWorkEventArgs e)
        {
            PointerFinderWorkerArgs pointerFinderWorkerArgs = (PointerFinderWorkerArgs)e.Argument;

            result_counter = 0;
            pointerList.Clear();
            next_pointer_finder_worker.ReportProgress(0);
            for (int section_idx = 0; section_idx < processManager.MappedSectionList.Count; ++section_idx)
            {
                if (next_pointer_finder_worker.CancellationPending)
                {
                    break;
                }
                MappedSection mappedSection = processManager.MappedSectionList[section_idx];
                if (mappedSection.Name.StartsWith("libSce"))
                {
                    continue;
                }
                mappedSection.PointerSearchInit(processManager, MemoryHelper, pointerList);
                next_pointer_finder_worker.ReportProgress((int)(((float)section_idx / processManager.MappedSectionList.Count) * 30));
            }

            if (next_pointer_finder_worker.CancellationPending)
            {
                return;
            }

            next_pointer_finder_worker.ReportProgress(30);
            pointerList.Init();
            next_pointer_finder_worker.ReportProgress(50);

            List <PointerResult> newPointerResultList = new List <PointerResult>();

            pointer_list_view.Rows.Clear();

            for (int i = 0; i < pointerResults.Count; ++i)
            {
                if (i % 100 == 0)
                {
                    next_pointer_finder_worker.ReportProgress((int)(50 * (float)(i) / pointerResults.Count) + 50);
                }

                PointerResult pointerResult = pointerResults[i];

                if (pointerList.GetTailAddress(pointerResult, processManager.MappedSectionList) == pointerFinderWorkerArgs.Address)
                {
                    newPointerResultList.Add(pointerResult);
                    ++result_counter;

                    if (result_counter < 2000)
                    {
                        int row_index = pointer_list_view.Rows.Add();
                        DataGridViewCellCollection row = pointer_list_view.Rows[row_index].Cells;

                        for (int j = 0; j < pointerResult.Offsets.Length; ++j)
                        {
                            row[j].Value = (pointerResult.Offsets[j].ToString("X"));                           //offset
                        }

                        if (pointerResult.Offsets.Length > 0)
                        {
                            row[row.Count - 2].Value = (pointerResult.GetBaseAddress(processManager.MappedSectionList).ToString("X"));   //address
                            row[row.Count - 1].Value = (processManager.MappedSectionList.GetSectionName(pointerResult.BaseSectionID));   //section
                        }
                    }
                }
            }

            pointerResults = newPointerResultList;


            next_pointer_finder_worker.ReportProgress(100);
        }