While working in a software testing company, I have experienced such requirements i.e. doing performance testing using an open-source tool. Apache JMeter is one of the best tools available in the market and high-level details are mentioned below -
"JMeter comes with the HTTP(S) Proxy Server, which can capture the requests between the web browser or mobile device and the backend and convert them into HTTP Request samplers."
So, if the desktop application you need to test uses HTTP or HTTPS protocols for communicating with the backend server, you should be able to record the requests with JMeter and replay them with an increased number of virtual users
Therefore you can use JMeter for load testing of almost any desktop application which communicates with the backend over HTTP.