Based solely on these limited facts the purchaser would be the customer of the reseller. The purchaser would potentially be using the software in violation of copyright laws.
DISCLAIMER: This is not specific legal advice and does not establish an attorney/client relationship.
The general rule is that a buyer cannot lawfully acquire more rights than the seller has to sell. So, if a software manufacturer sells a license to Person A that permits that person to use a piece of software but which prohibits its resale then Person B does NOT acquire good title to that software if he buys it from Person A. The software manufacturer can seek to recover that software from Person B or sue him for infringement.
The above response is general information ONLY and is not legal advice, does not form an attorney-client relationship, and should NOT be relied upon to take or refrain from taking any action. I am not your attorney. You should seek the advice of competent counsel before taking any action related to your inquiry.
As the previous answers indicated, based on the scenario you provided, the customer is a customer of the reseller.
I'm not your attorney; my answer includes assumptions. If you want me to be your attorney, I'm easy to find.