Sounds like you're the new resident pro for getting TW's sorted out.
That melted square is the flasher for the turn signals... I managed to melt mine too, but it still works so I didn't replace it.
The stock Yamaha flasher lists for over $60. If it needs to be replaced, you might want to try an auto parts store.