You should be able to boot to recovery tools and access any factory recovery image on the hard disk. There should be a prompt in the first few seconds after you boot up.
If that doesn’t work, it probably doesn’t need a product key for Win 8. I think factory installs of Windows are based on registering the motherboard (or hardware configuration). If you reinstall Win 8.1, it should detect that the hardware is licensed and register it as a valid copy. You should be able to download the Win8.1 ISO files from Microsoft and burn an install disk or create a bootable USB stick. You must make sure you have exactly the same version of Windows (i.e. language, 32 or 64 bit, Home or Professional). You can then boot from that disk and use the recovery tools to try and restore the original configuration or just do a clean install.
Before you do that, make a bootable Win10 install disk as well. If the Win8 recovery goes bad, you will be able to reinstall Win10. This will definitely not require a registration key because the hardware has been registered as valid.