I think migrating to Azure Functions is difficult, so I think App Service or container is better next to virtual machines.
If your application is a runtime supported by App Service for Windows, such as .NET, try App Service for Windows.
Even if you don't have the source code, you may be able to deploy by creating the package yourself.
https://learn.microsoft.com/en-us/azure/app-service/deploy-zip?tabs=cli
If the runtime doesn't support it, try creating a custom Windows container image and deploying it to the App Service for Windows Container.