No, as Apple's implementation is proprietary. It's based on the EFI 1.10 specification, but deviated from it in order to lock OS X to the system. If you tried to write it yourself, you'd lose this portion, and OS X wouldn't install. You'd actually have to hack it.
The only way to find out what Apple did, is to reverse engineer their firmware. You'd be able to do this for personal use, but not even distribute it freely, as it's Apple's Intellectual Property. I'd think they'd go after any individual, not just corporation/s, that did this and released it to the public.
Keep it private, and you'd be OK. But it's by no means an easy thing to do.