The actual programming to do this would be very simple, again if the .efi files are merely concatenated. It is the reverse engineering that is the real issue, figuring out how the .efi files are packed into the .fd file, specifically, where each one starts and ends. The .fd file could include some kind of table which holds this information or the .efi files could delimited by special code sequences.
by doind it that way, i would not even know where to start.
I am not a programmer or a coder and have limited knowledge of c++.
I do not know what to do with an fd file: how would you reverse engineer it? How would you split it open and view it's contents?
We can get back to the .fd file approach later, you almost got it the other way.