Does she live with you full time? Has her mother said things to her to contribute to her anger? Have grandparents said things to her to contribute to her anger?
These are things you need to find out or better yet her father needs to find out.
My brother is wonderful with children but went through ... with the new step child. Grandparents were saying horrid things.
If someone is influencing her talk to them and get them to realize this is not OK.
If no one is influencing her dad needs to have a talk with her. Dad needs to make sure she knows she is loved but this behavior makes him really sad. Hopefully she wants to see her father happy. He needs to explain that he cannot make money to buy things for her if he is really unhappy. She needs to understand the consequences of her behavior.
She needs a chore chart with rewards spelled out. She needs a behavior chart with rewards spelled out. "Oh, you want that new CD. Well if you get your chores done in a timely manner and have good behavior marks you and I could go get that CD." She needs to see rewards and lack of rewards for her behavior. Maybe two good weeks and she gets a date with Dad--dinner and a movie.
If possible you and she need to take a walk each day and just talk about how things are going/look at the world around you. Talk about school, sports, friends, books anything she is interested in.
Read the same book she is reading in school and discuses it.
You have your work cut out for you if she ruled the house before you came.
Realize the hateful things she says are not true. Try to ignore them. Do not react to them because then she knows she is winning the game of drive you away. If you stick it out you both win.
Get some tutoring for her math difficulties. Kids who are having a tough time just do not understand something. A good tutor should be able to figure it out and clear it up for her.