Results 1 to 1 of 1
  1. #1
    Chen172030238's Avatar
    Join Date
    Oct 2019
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1

    Why is my NtQueryVirtualMemory running error on R0, unable to read to normal 0x400000

    Why is my NtQueryVirtualMemory running error on R0, unable to read to normal 0x400000

    He can read normally on R3 permissions (the picture on the black background is R3).
    On R3 (white background image is R0) there are some 0x400000 that I don't want.

    These are my code:


    memcpy(&PID, pIoBuffer, sizeof(uInSize));


    ULONG ProcessHandle = 0;
    CLIENT_ID objCid;
    OBJECT_ATTRIBUTES objOa;
    RtlZeroMemory(&objOa, sizeof(OBJECT_ATTRIBUTES));
    RtlZeroMemory(&objCid, sizeof(CLIENT_ID));
    objOa.Length = sizeof(objOa);
    objCid.UniqueProcess = (HANDLE)PID;
    ZwOpenProcess(&ProcessHandle, 0x1F0FFF, &objOa, &objCid);

    MEMORY_BASIC_INFORMATION mbi;
    ULONG_PTR Index = 0x400000;

    NtQueryVirtualMemory1 NtQueryVirtualMemory;
    NtQueryVirtualMemory = (NtQueryVirtualMemory1)GetFunctionAddress("NtQuery VirtualMemory");

    NtQueryVirtualMemory(
    ProcessHandle,
    (PVOID)0,
    MemoryBasicInformation,
    &mbi,
    sizeof(mbi),
    0);

    DbgPrint("AllocationBase------------:%p\n", mbi.AllocationBase);
    DbgPrint("AllocationProtect---------:%p\n", mbi.AllocationProtect);
    DbgPrint("BaseAddress---------------:%p\n", mbi.BaseAddress);
    DbgPrint("Protect-------------------:%p\n", mbi.Protect);
    DbgPrint("RegionSize----------------:%p\n", mbi.RegionSize);
    DbgPrint("State---------------------:%p\n", mbi.State);
    DbgPrint("Type----------------------:%p\n", mbi.Type);

    DbgPrint("NtQueryVirtualMemory:%p\n", NtQueryVirtualMemory);
    DbgPrint("PID:%X\n", PID);
    DbgPrint("ProcessHandle:%X\n", ProcessHandle);
    status = STATUS_SUCCESS;
    break;
    Attached Thumbnails Attached Thumbnails
    GQ]OSPI0KO3}L1[NUSPMG9Q.png  

    )XEZX_J$[$KA4T6SO{%X~}J.png  

    R_3P`$PK{8N@LDIUI{T9MEU.png  

    Last edited by Chen172030238; 11-03-2019 at 02:31 AM.

Similar Threads

  1. [Solved] why do i have this error when try to login?
    By altrastreem in forum CrossFire Help
    Replies: 16
    Last Post: 03-08-2011, 03:18 PM
  2. Why can't I run?
    By Zed in forum Call of Duty Modern Warfare Help
    Replies: 7
    Last Post: 02-19-2011, 09:49 AM
  3. Why i keep getting this error?
    By muumimamma in forum Combat Arms EU Help
    Replies: 10
    Last Post: 07-03-2010, 10:19 PM
  4. Why does this site run so god damn slow?
    By shazbork in forum Flaming & Rage
    Replies: 24
    Last Post: 09-13-2008, 10:49 PM
  5. [Solution]-Combat Arms Already Running Error
    By Drown2008 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 08-21-2008, 05:51 PM