From Black Box to Blueprint: AI-Assisted Legacy Reverse Engineering