We study the processes γγ→KS0K±π and γγ→K+K-π+π -π0 using a data sample of 519.2fb-1 recorded by the BABAR detector at the PEP-II asymmetric-energy e+e- collider at center-of-mass energies near the Υ(nS) (n=2, 3, 4) resonances. We observe the ηc(1S), χc0(1P) and ηc(2S) resonances produced in two-photon interactions and decaying to K+K-π+π-π0, with significances of 18.1, 5.4 and 5.3 standard deviations (including systematic errors), respectively, and report 4.0σ evidence of the χc2(1P) decay to this final state. We measure the ηc(2S) mass and width in KS0K±π decays, and obtain the values m(ηc(2S))=3638.5±1.5±0.8MeV/c2 and Γ(ηc(2S))=13.4±4.6±3.2MeV, where the first uncertainty is statistical and the second is systematic. We measure the two-photon width times branching fraction for the reported resonance signals, and search for the χc2(2P) resonance, but no significant signal is observed. © 2011 American Physical Society.