Samsung has established a history of storing SIM unlock codes in the firmware with their previous Galaxy S series of smartphones, which lead to an app being released to automate the process. The new Galaxy S II continues along that line, with a new app released today that searches through the nv_data.bin, decrypts the code, and reveals it, allowing the use of the device on other networks.
The app is created by well known XDA developer Chainfire, and is available from the Android market under the name " Galaxy S2 SIM Unlock". The app requires your Galaxy S II to be rooted, after which operation is a simple one click process. Once complete, the tool reveals your unlock code (NCK) which is then input after switching to an unsupported SIM chip, unlocking the device. It also comes with a warning not to run the search for the unlock code more than once as the device may enter a "freeze" state where even the valid unlock code won't be accepted. The tool also supports locating the unfreeze code (MCK) if this should occur, although another warning is given that if the unlock code wasn't valid, the unfreeze code is not likely to be either.
For those technically-inclined who wish to know the exact unlocking process or attempt it manually, a thread by Odia outlines the entire process. Root access, a hex editor, and the android SDK is required for the manual method, which is also linked below.