static int rprobe(AVFormatContext *s, uint8_t *enc_header, const uint8_t *r_val)

{

    OMAContext *oc = s->priv_data;

    unsigned int pos;

    struct AVDES av_des;



    if (!enc_header || !r_val)

        return -1;



    /* m_val */

    av_des_init(&av_des, r_val, 192, 1);

    av_des_crypt(&av_des, oc->m_val, &enc_header[48], 1, NULL, 1);



    /* s_val */

    av_des_init(&av_des, oc->m_val, 64, 0);

    av_des_crypt(&av_des, oc->s_val, NULL, 1, NULL, 0);



    /* sm_val */

    pos = OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size;

    av_des_init(&av_des, oc->s_val, 64, 0);

    av_des_mac(&av_des, oc->sm_val, &enc_header[pos], (oc->i_size >> 3));



    pos += oc->i_size;



    return memcmp(&enc_header[pos], oc->sm_val, 8) ? -1 : 0;

}

static int rprobe(AVFormatContext *s, uint8_t *enc_header, const uint8_t *r_val)

{

    OMAContext *oc = s->priv_data;

    unsigned int pos;

    struct AVDES av_des;



    if (!enc_header || !r_val)

        return -1;



    

    av_des_init(&av_des, r_val, 192, 1);

    av_des_crypt(&av_des, oc->m_val, &enc_header[48], 1, NULL, 1);



    

    av_des_init(&av_des, oc->m_val, 64, 0);

    av_des_crypt(&av_des, oc->s_val, NULL, 1, NULL, 0);



    

    pos = OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size;

    av_des_init(&av_des, oc->s_val, 64, 0);

    av_des_mac(&av_des, oc->sm_val, &enc_header[pos], (oc->i_size >> 3));



    pos += oc->i_size;



    return memcmp(&enc_header[pos], oc->sm_val, 8) ? -1 : 0;

}

static int rprobe(AVFormatContext *s, uint8_t *enc_header, const uint8_t *r_val)     if (!enc_header || !r_val)         return -1;
static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, const uint8_t *VAR_2)

{

    OMAContext *oc = VAR_0->priv_data;

    unsigned int VAR_3;

    struct AVDES VAR_4;



    if (!VAR_1 || !VAR_2)

        return -1;



    

    av_des_init(&VAR_4, VAR_2, 192, 1);

    av_des_crypt(&VAR_4, oc->m_val, &VAR_1[48], 1, NULL, 1);



    

    av_des_init(&VAR_4, oc->m_val, 64, 0);

    av_des_crypt(&VAR_4, oc->s_val, NULL, 1, NULL, 0);



    

    VAR_3 = OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size;

    av_des_init(&VAR_4, oc->s_val, 64, 0);

    av_des_mac(&VAR_4, oc->sm_val, &VAR_1[VAR_3], (oc->i_size >> 3));



    VAR_3 += oc->i_size;



    return memcmp(&VAR_1[VAR_3], oc->sm_val, 8) ? -1 : 0;

}

static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, const uint8_t *VAR_2)
{ OMAContext *oc = VAR_0->priv_data; unsigned int VAR_3; struct AVDES VAR_4; if (!VAR_1 || !VAR_2)
return -1; av_des_init(&VAR_4, VAR_2, 192, 1); av_des_crypt(&VAR_4, oc->m_val, &VAR_1[48], 1, NULL, 1); av_des_init(&VAR_4, oc->m_val, 64, 0); av_des_crypt(&VAR_4, oc->s_val, NULL, 1, NULL, 0); VAR_3 = OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size; av_des_init(&VAR_4, oc->s_val, 64, 0); av_des_mac(&VAR_4, oc->sm_val, &VAR_1[VAR_3], (oc->i_size >> 3)); VAR_3 += oc->i_size; return memcmp(&VAR_1[VAR_3], oc->sm_val, 8) ? -1 : 0; }