how do you find what window takes process ownership?
That's a misconception, surely the reason you are getting stuck. A window doesn't own a process, it is the other way around. And more subtly, a thread owns a window. And a process owns a thread.
When you use Process.GetProcesses() then you'll enumerate a lot of processes that do not have any window at all. Like all of the services that run on the machine, having dozens of them is not unusual. You can use Task Manager to see them in the Processes tab, be sure to click the option that shows processes owned by all users. SysInternals' Process Explorer is also a very nice tool to see what is running.
So don't be surprised that Process.MainWindowHandle returns IntPtr.Zero. And also keep in mind that it is a guess. A process can easily own multiple top-level windows. Which one of them is the "main" window isn't always obvious. The Process class uses a simple rule, it assumes that the first top-level window that it finds that doesn't have an owner and is visible is the main window.
To reliably get the top-level windows for a process you must first enumerate the threads in the process. Easy to do with Process.Threads. Then for each thread, you iterate the windows it owns by pinvoking EnumThreadWindows(). Exact same idea as EnumWindows() but limited to the specific thread and without the firehose problem and lower odds that it falls apart because a new window got created while you were iterating. You'll get the top-level windows owned by the thread, what you want, enumerating the child windows owned by each top-level window requires EnumChildWindows().
Some notable bad news: do note that some filtering is required to get decent results. A thread very commonly owns a window that's not visible at all. Commonly used to take care of inter-thread communication, particularly common for code that uses COM. So you probably also want to pinvoke IsWindowVisible(). And always check for errors on these pinvoked functions, failure is common when your program isn't running with admin privileges and/or is not UAC elevated. Always double-check your results by what you see from the Spy++ utility.