This repository contains a driver using the new kernel-mode asynchronous wait capability available in 21H1 to wait on cmd.exe process and execute a DPC when it is signaled. It also contains the implementation of a few kernel functions supporting this capability
https://windows-internals.com/dpws-are-the-new-dpcs-deferred-procedure-waits-in-windows-10-21h1/