Decomposition of scattered electromagnetic fields into vector spherical wave functions on surfaces with general shapes