There was a bug on the code I used that blocked the entire scanning.
I can now perfectly go through all the memory with VirtualQueryEx and ReadProcessMemory keeping only the pages that are marked as private, and then find the variable