How to make a bachelor thesis out of optimizing /updating an application?
The usual, and normally a good, way is to get an advisor at the university if you don't already have one and discuss this with them. It could save you a lot of grief later and their advice would be more valid in your circumstances than mine.
You may also need to discuss this with the company in case any trade secrets are involved in the application.
But, in general, reimplementing a legacy application using modern design patterns and/or improving performance and/or providing better UI is not a bad idea.