The company will pay $50 million to New York's financial regulator and another $50 million to expand its compliance department.