Bremsstrahlung function, leading Lüscher correction at weak coupling and localization