def METHOD_NAME(core: LegendaryCore, app_name, offline: bool,
                      launch_args: LaunchArgs) -> LaunchArgs:
    origin_uri = core.get_origin_uri(app_name, offline)
    if platform.system() == "Windows":
        launch_args.executable = origin_uri
        launch_args.args = []
        # only set it here true, because on linux it is a launch command like every other game
        launch_args.is_origin_game = True
        return launch_args
    command = core.get_app_launch_command(app_name)
    if not os.path.exists(command[0]) and shutil.which(command[0]) is None:
        return launch_args
    command.append(origin_uri)
    env = core.get_app_environment(app_name)
    launch_args.env = QProcessEnvironment.systemEnvironment()
    for name, value in env.items():
        launch_args.env.insert(name, value)
    launch_args.executable = command[0]
    launch_args.args = command[1:]
    return launch_args