finished func_02a and fix some bugs
func_02b finished/fix some bugs/modify check_ior function