World No 1 Rory McIlroy shut out noisy distractions to finish within two shots of leader Peter Hanson on day two of the BMW Masters in Shanghai yesterday.