China is generally happy to sell to any buyer as long as it doesn't effect Chinese interests
China would happily sell Iran whatever it wants or needs
The problem is U.S/western sanctions make the deal unlucrative, any money china makes from the deal may be countered by sanctions etc
And china always acts in it's own interests and if a country wants more Chinese support then it has to work with China more closely
Pakistan is close to China, and because our relationship is so close whenever our back was against the wall for whatever reason, we could also rely on support from China
Even in the conflict with India last year, Pakistan received support from both China and Turkey