'Identifies the extended application (a PDF file) associated with the CGC binary.
:param angr.analyses.CFG cfg: The control flow graph.
:param pyvex.IRSB irsb: The IRSB object.
:param int irsb_addr: Address of the block.
:param int stmt_idx: Statement ID.
:param int data_addr: Address of the data in memory.
:param int max_size: Maximum size possible.
:return: A 2-tuple of data type and size.
:rtype: tuple'

def _cgc_extended_application_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size):

    if (max_size < 100):
        return (None, None)
    data = self.fast_memory_load(data_addr, 20, str)
    if (data[:4] != 'The    '):
        return (None, None)
    data = self.fast_memory_load(data_addr, max_size, str)
    m = re.match('The    ([\\d]+)    byte    CGC    Extended    Application    follows.', data)
    if (not m):
        return (None, None)
    pdf_size = int(m.group(1))
    if ('%PDF' not in data):
        return (None, None)
    if ('%%EOF' not in data):
        return (None, None)
    pdf_data = data[data.index('%PDF'):(data.index('%%EOF') + 6)]
    if (len(pdf_data) != pdf_size):
        return (None, None)
    return ('cgc-extended-application', max_size)
