Divorce case with child custody

My sister (A) has been married for 7 years and she has a son. She has been having problems with her husband (B) since more than 5 years now. He beats him if she says anything to their son. She never got the deserved stature in the family because of her husband's (my jijaji) brother's wife (C) [one of the reason]. C has been taking care of the family before my sister's (A) marriage and so C got the respect in the family. C also has a son who had issues during his initial years of childhood and because of that the whole family is very overly concerned about both children. My sister (A) has to listen to all the tantrums of her mother-in-law, husband wihtout any reason to the extent that C and her husband (My jijaji's brother) once told mother-in-law to stop orelse A will become mad. "A" has been beaten twice thrice by her husband. After few years of marriage "A" told her husband that she was teased with a guy (D) who she met at a random marriage of a cousin. "A", till date, talks to "D" and no one from her maternal side knew till the whole case burst few days ago. "A"'s husband caught her talking to "D" and basis that he wants to file a divorce and prove "D" (my sister) characterless. "A" (my sister) is a qualified Optometrist and her husband is just a graduate, doing business which is not going well. Talking about custody and considering the scenario, who gets the custody of the child? He completed 5 years last month. If she gets divorced, she is well qualified to take care of her child financially and so is her brother (myself). However, that's not the case with her husband. How do I take this case so that the divorce is granted with custody of child with my sister? And how do i deal with the fact that her husband wants to prove my sister characterless? Also, my sister's husband used to send sexual texts to my cousin sister (married) after marriage. Will that strengthen my case? Kindly help