Here's an alternative to Clinton Herring's ufn_vbintohexstr which should be much faster with large varbinary values.
First, in his original version, the inner-loop CASE statements can be replaced with this:
select @value = @value +
How does it work? By adding 6 to a hex-digit in (@vbin&15), you have a value from 16 to 21. If you integer-divide by 16, it's always 1. multiply by 7, and you have the amount needed to add to turn 0x0A to 'A', given that 0x30 (48) has already been added. (Okay, I know it's confusing)
Anyway, the neat thing about this technique is that it can be done for 4 bytes in parallel. Below is the entire arith-8 version, producing 8-hex-digits at a time.