Not a big deal, but you call VMMDLL_Map_GetVadW
without a matching VMMDLL_MemFree
call.
Not sure how often get_memory_region
gets called, but it will result in a memory leak each time.
If it's only called once not an issue since as we know all allocations get killed on process exit.
Just need to add a VMMDLL_MemFree
before returning from get_memory_region()
.