Reconstruct Kaplan--Meier Estimator as M-estimator and Its Confidence Band