f0recast is an application created by iH8sn0w. He created a simple application to tap into MobileDevice Library inside of: C:\Program Files\Common Files\Apple\Mobile Device Support\bin\iTunesMobileDevice.dll
It grabs these functions when an iDevice is connected:
How does it determine if its unlockable?
How does it determine if it's restricted to a tethered jailbreak?
f0recast checks the built-in database of firmwares which are tethered and untethered.