Indirect bounds on heavy scalar masses of the two-Higgs-doublet model in light of recent Higgs boson searches