I am trying to inject bytes into the 64-bit game process, since there are a lot of bytes to look for the cave address during the game, but VirtualQueryEx does not work correctly, compared it with the VMMap program 
C # does not find free addresses at all. How to make finds these free places in the space of the game.
IntPtr handle = OpenProcess(ProcessAccessFlags.All, false, proc.Id); SYSTEM_INFO sysinfo = new SYSTEM_INFO(); GetSystemInfo(ref sysinfo); long MaxAddress = (Int64)sysinfo.lpMaximumApplicationAddress; long address = 0; do { MEMORY_BASIC_INFORMATION m; UIntPtr result = VirtualQueryEx(handle, (IntPtr)address, out m, (int)Marshal.SizeOf(typeof(MEMORY_BASIC_INFORMATION))); ListViewItem l = new ListViewItem(m.BaseAddress.ToString("X8")); l.SubItems.Add(m.AllocationBase.ToString("X8")); l.SubItems.Add(m.RegionSize.ToString()); l.SubItems.Add(m.State.ToString()); l.SubItems.Add(m.AllocationProtect.ToString()); l.SubItems.Add(m.Protect.ToString("X3")); l.SubItems.Add(m.Type.ToString()); l.SubItems.Add(m.__alignment1.ToString("X8")); l.SubItems.Add(m.__alignment2.ToString("X8")); address = (long)m.BaseAddress + (long)m.RegionSize; } while (address <= MaxAddress); fairly common code.
