Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7862245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:03:17+00:00 2026-06-02T23:03:17+00:00

I am trying to scan memory of a 3rd party application. I have already

  • 0

I am trying to scan memory of a 3rd party application. I have already found out the address; right now is at 0x0643FB78. The thing is, I can never get up there since LPMODULEENTRY32->modBaseAddr is 0x00400000 and LPMODULEENTRY32->modBaseSize is merely 0x006FF000, thus the max address I can scan for this module is 0x00AFF000.

Does that mean the address I seek does live inside another process/module/thread/something? I am quite confident the process I have does contain the address though. How should I access the memory then? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:03:20+00:00Added an answer on June 2, 2026 at 11:03 pm

    At least in my opinion, if you have an LPMODULEENTRY involved, you’re probably starting in the wrong direction. I’d walk through the blocks of memory in the target process with VirtualQueryEx instead. This will give you a MEMORY_BASIC_INFORMATION about each block in that process. You can then use ReadProcessMemory and scan through the blocks to find what you’re looking for.

    Here’s some old code I wrote to do roughly the same thing, but looking for a string rather than a pointer:

    #include <iostream>
    #include <vector>
    #include <string>
    #include <windows.h>
    #include <algorithm>
    #include <iterator>
    
    template <class InIter1, class InIter2, class OutIter>
    void find_all(unsigned char *base, InIter1 buf_start, InIter1 buf_end, InIter2 pat_start, InIter2 pat_end, OutIter res) {
        for (InIter1 pos = buf_start;
            buf_end!=(pos=std::search(pos, buf_end, pat_start, pat_end));
            ++pos)
        {
            *res++ = base+(pos-buf_start);
        }
    }
    
    template <class outIter>
    void find_locs(HANDLE process, std::string const &pattern, outIter output) {
    
        unsigned char *p = NULL;
        MEMORY_BASIC_INFORMATION info;
    
        for ( p = NULL;
            VirtualQueryEx(process, p, &info, sizeof(info)) == sizeof(info);
            p += info.RegionSize ) 
        {
            std::vector<char> buffer;
    
            if (info.State == MEM_COMMIT && 
                (info.Type == MEM_MAPPED || info.Type == MEM_PRIVATE)) 
            {
                SIZE_T bytes_read;
                buffer.resize(info.RegionSize);
                ReadProcessMemory(process, p, &buffer[0], info.RegionSize, &bytes_read);
                buffer.resize(bytes_read);
                find_all(p, buffer.begin(), buffer.end(), pattern.begin(), pattern.end(), output);
            }
        }
    }
    
    int main(int argc, char **argv) {
        if (argc != 3) {
            fprintf(stderr, "Usage: %s <process ID> <pattern>", argv[0]);
            return 1;
        }
    
        int pid;
        sscanf(argv[1], "%i", &pid);
    
        std::string pattern(argv[2]);
    
        HANDLE process = OpenProcess( 
            PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, 
            false,
            pid);
    
        find_locs(process, pattern, 
            std::ostream_iterator<void *>(std::cout, "\n"));
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to scan my application (window based with xib) for memory leaks, but
I'm developing an application with BLE and am trying to constantly scan every known
I'm writing a program trying to implement a toy XML processor. Right now the
I was trying to scan only allowed types in my c program. I have
I'm trying to make a scanner scan a txt file, when I have it
I am trying to scan my harddrive for jpg and mp3 files. I have
I'm trying to port scan given IP address with range of 20 ports. I
I am trying to scan through an NSMutableArray and remove all 0's. (They are
The language I am using is C I am trying to scan data from
I'm trying to implement the Graham Scan in C++ but it doesn't work and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.