What functions does WordPress use for filtering / sanitizing comments?

You can use wp_filter_kses() and then wp_unslash to filter the content.