It does take hp into account, giving lower and more common monsters a very low chance of being stolen, while providing a counter to big monsters.
16.6 base percentage + HP/50 rounded up.
Titan would always be stolen, and psion (5/50 = .1; .1 + .166 = 27%) would be unlikely to be stolen. Most creatures will not have more than 5hp anyway.
Pest, (.166 + .04 = 21%)
Light Dragon, (.166 + .24 = 41%)