A GPT disk image is written to C:\endless\endless.img. It is then loopback-mounted both from GRUB and from Endless OS’s initramfs. (A previous version used device-mapper to map the image file, bypassing NTFS, for performance reasons.)
On BIOS systems we use the BCD loader to chainload GRUB.
On EFI systems that is not an option: Windows’ bootloader cannot chainload other EFI bootloaders, particularly not when Secure Boot is in the mix. So on EFI systems we make GRUB the default bootloader and offer an option to chainload Windows.