IF what you ask was possible, THEN there would be no software or video piracy whatsoever. You could have some playing software that simply plays the movie but refuses to dump the data in a file, and that playing software would "prove" its unmodified status to the server, thus allowing the download.
This tells us that what you seek must be hard and would be worth an awful lot of money if it was ever invented. There also are good theoretical reasons why it is actually impossible, which would explain why nobody found such a way to reliably validate software remotely. The bottom-line is that you cannot ensure integrity of anything that runs on the attacker's own machine.
Now, if you have some high level of control on the target hardware, then things become possible. This is the security model of existing game consoles: the firmware and all games are under strict control of the publishers; no new software enters a console if it has not been digitally signed by an allowed publisher. Mere users cannot simply program their console. This is still hard to do properly -- console firmware, like any software, has bugs and thus all this signature-based shielding might be worked around occasionally -- but at least it can theoretically work.
But for a PC, forget it.