We perform resolvent analysis to examine the perturbation dynamics over the laminar separation bubble (LSB) that forms near the leading edge of a NACA 0012 airfoil at a chord-based Reynolds number of 500,000 and an angle of attack of 8 degrees. While we focus on the LSB residing over 6% of the chord length, the resolvent operator is constructed about the global mean flow over the airfoil, avoiding numerical issues arising from domain truncation. Moreover, randomized SVD is adopted in the present analysis to relieve the computational cost associated with the high-Re global base flow. To examine the local physics over the LSB, we consider the use of exponential discounting to limit the time horizon that allows for the instability to develop with respect to the base flow. With discounting, the gain distribution over frequency accurately captures the spectral content over the LSB obtained from flow simulation. The peak-gain frequency also agrees with previous flow control results on suppressing dynamic stall over a pitching airfoil. According to the gain distribution and the modal structures, we conclude that the dominant energy-amplification mechanism is the Kelvin-Helmholtz instability. In addition to discounting, we also examine the use of spatial windows for both the forcing and response. From the response-windowed analysis, we find that the LSB serves the main role of energy amplifier, with the amplification saturating at the reattachment point. The input window imposes the constraint of surface forcing, and the results show that the optimal actuator location is slightly upstream of the separation point. The surfaceforcing mode also suggest the optimal momentum forcing in the surface-tangent direction, with strong uni-directionality that is ideal for synthetic-jet-type actuators. This study demonstrates the strength of randomized resolvent analysis in tackling high-Reynolds-number base flows and calls attention to the care needed for base-flow instabilities. The physical insights provided by the resolvent analysis can also support flow control studies that target the LSB for suppressing flow separation or dynamic stall.