Thumb divide doesn't work in ARM9 for whatever reason. You have to use a "dirty hack" to divide. Check out toenailed's noted RTWE source. He has his version of divide in there. I see you already have your own, though.