private static IEnumerable <ulong> AllHeaps(DbgEngDebugger debugger) { dynamic teb = debugger.GetCurrentThreadTebEffective(CancellationToken.None).Value; dynamic peb = teb.ProcessEnvironmentBlock.DbgGetPointee(); uint numberOfHeaps = peb.NumberOfHeaps.ToUint32(null); return(debugger.ReadMemPointers((ulong)peb.ProcessHeaps.DbgGetPointer(), numberOfHeaps)); }