Exemplo n.º 1
0
        private void cmbProcesses_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                lstSection.Items.Clear();
                lvResult.Items.Clear();
                btnNewScan.Enabled        = true;
                cbValueTypeList.Enabled   = true;
                cbCompareTypeList.Enabled = true;
                lstSection.Enabled        = true;

                ProcessInfo processInfo = processManager.GetProcessInfo(cmbProcesses.Text);
                Util.DefaultProcessID = processInfo.pid;
                processManager.MappedSectionList.InitMemorySectionList(processInfo);

                lstSection.BeginUpdate();
                for (int i = 0; i < processManager.MappedSectionList.Count; ++i)
                {
                    lstSection.Items.Add(processManager.MappedSectionList.GetSectionName(i), false);
                }
                lstSection.EndUpdate();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 2
0
        private void processes_comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                section_list_box.Items.Clear();
                result_list_view.Items.Clear();
                new_scan_btn.Enabled     = true;
                valueTypeList.Enabled    = true;
                compareTypeList.Enabled  = true;
                section_list_box.Enabled = true;

                ProcessInfo processInfo = processManager.GetProcessInfo(processes_comboBox.Text);
                Util.DefaultProcessID = processInfo.pid;
                processManager.MappedSectionList.InitMemorySectionList(processInfo);

                section_list_box.BeginUpdate();
                for (int i = 0; i < processManager.MappedSectionList.Count; ++i)
                {
                    section_list_box.Items.Add(processManager.MappedSectionList.GetSectionName(i), false);
                }
                section_list_box.EndUpdate();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 3
0
        private void processes_comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                section_list_box.Items.Clear();
                result_list_view.Items.Clear();
                cheat_list_view.Rows.Clear();
                cheatList.Clear();

                ProcessInfo processInfo = processManager.GetProcessInfo(processes_comboBox.Text);
                processManager.InitMemorySectionList(processInfo);
                MemoryHelper.ProcessID = processManager.ProcessID;

                section_list_box.BeginUpdate();
                for (int i = 0; i < processManager.MappedSectionList.Count; ++i)
                {
                    section_list_box.Items.Add(processManager.GetSectionName(i), false);
                }
                section_list_box.EndUpdate();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 4
0
        public GameInfo()
        {
            string process_name   = "";
            string section_name   = "";
            ulong  id_offset      = 0;
            ulong  version_offset = 0;
            int    section_prot   = 0;

            switch (Util.Version)
            {
            case 405:
                process_name   = GAME_INFO_4_05_PROCESS_NAME;
                section_name   = GAME_INFO_4_05_SECTION_NAME;
                id_offset      = GAME_INFO_4_05_ID_OFFSET;
                version_offset = GAME_INFO_4_05_VERSION_OFFSET;
                section_prot   = GAME_INFO_4_05_SECTION_PROT;
                break;

            case 455:
                process_name   = GAME_INFO_4_55_PROCESS_NAME;
                section_name   = GAME_INFO_4_55_SECTION_NAME;
                id_offset      = GAME_INFO_4_55_ID_OFFSET;
                version_offset = GAME_INFO_4_55_VERSION_OFFSET;
                section_prot   = GAME_INFO_4_55_SECTION_PROT;
                break;

            default:
                break;
            }

            try
            {
                ProcessManager processManager = new ProcessManager();
                ProcessInfo    processInfo    = processManager.GetProcessInfo(process_name);

                MemoryHelper      memoryHelper      = new MemoryHelper(false, processInfo.pid);
                MappedSectionList mappedSectionList = processManager.MappedSectionList;
                mappedSectionList.InitMemorySectionList(processInfo);
                List <MappedSection> sectionList = mappedSectionList.GetMappedSectionList(section_name, section_prot);

                if (sectionList.Count != 1)
                {
                    return;
                }

                GameID  = System.Text.Encoding.Default.GetString(memoryHelper.ReadMemory(sectionList[0].Start + id_offset, 16));
                GameID  = GameID.Trim(new char[] { '\0' });
                Version = System.Text.Encoding.Default.GetString(memoryHelper.ReadMemory(sectionList[0].Start + version_offset, 16));
                Version = Version.Trim(new char[] { '\0' });
            }
            catch
            {
            }
        }
Exemplo n.º 5
0
        private void processes_comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                section_list_box.Items.Clear();
                result_list_view.Items.Clear();
                new_scan_btn.Enabled     = true;
                valueTypeList.Enabled    = true;
                compareTypeList.Enabled  = true;
                section_list_box.Enabled = true;

                ProcessInfo?maybeProcessInfo = processManager.GetProcessInfo(processes_comboBox.Text);
                if (maybeProcessInfo is null)
                {
                    msg.Text = "No process information found.";
                    return;
                }
                ProcessInfo processInfo = (ProcessInfo)maybeProcessInfo;

                Util.DefaultProcessID = processInfo.pid;
                ProcessMap processMap = MemoryHelper.GetProcessMaps(processInfo.pid);
                if (processMap is null)
                {
                    msg.Text = "No process maps found.";
                    return;
                }

                processManager.MappedSectionList.InitMemorySectionList(processMap);

                section_list_box.BeginUpdate();
                for (int i = 0; i < processManager.MappedSectionList.Count; ++i)
                {
                    section_list_box.Items.Add(processManager.MappedSectionList.GetSectionName(i), false);
                }
                section_list_box.EndUpdate();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 6
0
        public GameInfo()
        {
            Dictionary <string, object> gameInfo = gameInfos[0];

            if (gameInfos.ContainsKey(Util.Version))
            {
                gameInfo = gameInfos[Util.Version];
            }

            string process_name = (string)gameInfo["process_name"];
            string section_name = (string)gameInfo["section_name"];

            ulong id_offset      = Convert.ToUInt64(gameInfo["id_offset"]);
            ulong version_offset = Convert.ToUInt64(gameInfo["version_offset"]);
            int   section_prot   = Convert.ToInt32(gameInfo["section_prot"]);

            try
            {
                ProcessManager processManager = new ProcessManager();
                ProcessInfo    processInfo    = processManager.GetProcessInfo(process_name);

                MemoryHelper      memoryHelper      = new MemoryHelper(false, processInfo.pid);
                MappedSectionList mappedSectionList = processManager.MappedSectionList;
                mappedSectionList.InitMemorySectionList(MemoryHelper.GetProcessMaps(processInfo.pid));
                List <MappedSection> sectionList = mappedSectionList.GetMappedSectionList(section_name, section_prot);

                if (sectionList.Count != 1)
                {
                    return;
                }

                GameID  = System.Text.Encoding.Default.GetString(memoryHelper.ReadMemory(sectionList[0].Start + id_offset, 16));
                GameID  = GameID.Trim(new char[] { '\0' });
                Version = System.Text.Encoding.Default.GetString(memoryHelper.ReadMemory(sectionList[0].Start + version_offset, 16));
                Version = Version.Trim(new char[] { '\0' });
            }
            catch
            {
            }
        }