I had to repair a bunk end a few years ago. Not too difficult.
To remove the bunk end you will open it up fully. Once open, you will see the screws that hold it in place on the 'bottom' of the door. I do not remember how many there are, 6, 9 or 12. Get something to support it when you unscrew them. Once undone, you can disconnect the cables that hold it up and it will be free to move around.
Make sure the insulation you use and glue are compatible - I found out the hard way and melted the foam insulation.
I have a document I wrote up. If you'd like it PM me your email address and I'll send it to you.