refactor input (flags in particular) and add sub_6EA73F