def detect_starbound_folder(self):
        known_locations = [
            'C:\Program Files\Steam\SteamApps\common\Starbound',
            'C:\Program Files (x86)\Steam\SteamApps\common\Starbound',
            os.path.expanduser("~/Library/Application Support/Steam/SteamApps/common/Starbound"),
            os.path.expanduser("~/.steam/root/SteamApps/common/Starbound"),
            os.path.expanduser("~/.steam/steam/SteamApps/common/Starbound")
        ]

        if platform.system() == "Windows":
            import winreg
            try:
                key = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 211820"
                if platform.machine().endswith('86'):
                    key = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 211820"
                starbound_uninstall = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, key)
                starbound_path = winreg.QueryValueEx(starbound_uninstall, "InstallLocation")[0]
                known_locations.append(os.path.normpath(starbound_path))
                starbound_uninstall.Close()
            except OSError:
                pass
            try:
                steam = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Software\\Valve\\Steam")
                steam_path = os.path.normpath(winreg.QueryValueEx(steam, "SteamPath")[0])
                known_locations.append(os.path.join(steam_path, "SteamApps", "common", "Starbound"))
                steam.Close()
            except __HOLE__:
                pass

        for path in known_locations:
            if os.path.isdir(path) and os.path.isfile(os.path.join(path, "assets", "packed.pak")):
                return path
        return ""
dataset/ETHPy150Open wizzomafizzo/starcheat/starcheat/config.py/Config.detect_starbound_folder