Simply canceling the petition for sponsorship and filing for divorce may not be sufficient to obtain sole custody. If your reasons are malicious in any way and she has an excellent divorce and immigration attorney, she may be able to petition for the residency and not only stay in the country but also be able to petition for joint or sole custody.
Your best bet is to discuss the details of why you cancelled the sponsorship with a divorce attorney, because if it won't look good in court, it may not hold up.
Custody is determined by the best interest(s) of the children--courts will award custody to the parent with whom the children will do best or best taken care of by. In that regards, concerning your wife's citizenship and your cancelation of her petition:
1) Depending on where your wife is a citizen--the country--it's certainly possible that a court will conclude that it's better for a U.S. citizen to have custody of the children. Citizenship in nations like Somalia or Yemen, have obvious negatives in the minds of many. On the other hand, citizenship in Japan, Western Europe, Canada, etc. would not be seen as a negative.
2) Your act in cancelling the petition, thereby arguably disadvanting your child by making it more difficult for her to have a relationship with her month, could be seen as a negative against you--putting your own interests or feelings ahead of your child's interests.
IMPORTANT NOTICE: The Answer(s) provided above are for general information only. The attorney providing the answer was not serving as the attorney for the person submitting the question or in any attorney-client relationship with such person. Laws may vary from state to state, and sometimes change. Tiny variations in the facts, or a fact not set forth in a question, often can change a legal outcome or an attorney's conclusion. Although AttorneyPages.com has verified the attorney was admitted to practice law in at least one jurisdiction, he or she may not be authorized to practice law in the jurisdiction referred to in the question, nor is he or she necessarily experienced in the area of the law involved. Unlike the information in the Answer(s) above, upon which you should NOT rely, for personal advice you can rely upon we suggest you go to AttorneyPages.com and retain an attorney to represent you.