If it was accepted, the program would then load a key file that would decrypt the wallet.dat on the stick, transfer the correct amount, encrypt it again, and print a receipt for the transaction.
If the program has access to your wallet, what is preventing it from making a copy?
The program would require a PIN that decrypted the wallet; the receipt would show the amount taken out by the program and your remaining balance.