I have an AT&T S4 with MDL baseband that I bought a year ago.
I rooted the phone after I received it.
After the root I tried free sim unlock methods that posted on the net and none of them work for me.
Finally I bought the code (I think it cost around $30 and I had to provide the IMEI number of my phone).
It may or may not answer your question but I just want you to know what did work for me.