For a random walk governed by a general distribution function F on (−∞, +∞), we establish the exponential and subexponential asymptotic behaviour of the corresponding right Wiener-Hopf factor F+. The results apply to classes of distribution functions in recent publications: the subexponential class Image and a related (exponential) class Imageγ. Given the behaviour of F+, the Wiener-Hopf identity is used, to obtain the behaviour of F. To reverse the argument, we derive a new identity, similar in form to the first one. The results for F+ are then fruitfully applied to give a full description of the tail behaviour of the maximum of the randon walk. Also they provide new proofs for recent theorems on the tail of the waiting-time distribution in the GI/G/1 queue.