def METHOD_NAME(app_dir, package):
    """API Analysis."""
    try:
        dat = ''
        hooked_apis = get_hooked_apis()
        api_details = {}
        hooks = []
        location = os.path.join(app_dir, 'x_logcat.txt')
        if not is_file_exists(location):
            return {}
        logger.info('Xposed Droidmon API Analysis')
        with open(location, 'r',
                  encoding='utf8',
                  errors='ignore') as flip:
            dat = flip.readlines()
        res_id = 'Droidmon-apimonitor-' + package + ':'
        for line in dat:
            if res_id not in line:
                continue
            _, value = line.split(res_id, 1)
            try:
                apis = json.loads(value, strict=False)
                call_data = {}
                call_data['class'] = apis['class']
                call_data['method'] = apis['method']
                if apis.get('return'):
                    call_data['return'] = apis['return']
                if apis.get('args'):
                    call_data['args'] = apis['args']
                for api, details in hooked_apis.items():
                    if re.findall(details['regex'], apis['class']):
                        call_data['api'] = api
                        # Decode Base64
                        if ('decode' in apis['method']
                                and api == 'api_base64'):
                            call_data['decoded'] = base64_decode(
                                call_data['args']).decode('utf-8', 'ignore')
                        hooks.append(call_data)
            except Exception:
                pass
        for hook in hooks:
            iden = hook['api']
            api_details[iden] = {
                'name': hooked_apis[iden]['name'],
                'icon': hooked_apis[iden]['icon'],
                'calls': [],
            }
        for hook in hooks:
            iden = hook['api']
            if hook not in api_details[iden]['calls']:
                api_details[iden]['calls'].append(hook)
    except Exception:
        logger.exception('Droidmon API Analysis')
    return api_details