Recovery of functions from transformed moments: A unified approach