'Call _next_unscanned_addr() first to get the next address that is not scanned. Then check if data locates at
that address seems to be code or not. If not, we\'ll continue to for the next un-scanned address.'

def _next_code_addr_core(self):

    next_addr = self._next_unscanned_addr()
    if (next_addr is None):
        return None
    start_addr = next_addr
    sz = ''
    is_sz = True
    while is_sz:
        while (next_addr in self._initial_state.memory):
            try:
                l.debug('Searching    address    %x', next_addr)
                val = self._initial_state.mem_concrete(next_addr, 1, inspect=False, disable_actions=True)
                if (val == 0):
                    if (len(sz) < 4):
                        is_sz = False
                    break
                if (chr(val) not in self.PRINTABLES):
                    is_sz = False
                    break
                sz += chr(val)
                next_addr += 1
            except SimValueError:
                l.debug('Address    0x%08x    is    not    concretizable!', next_addr)
                break
        if (sz and is_sz):
            l.debug('Got    a    string    of    %d    chars:    [%s]', len(sz), sz)
            self._seg_list.occupy(start_addr, (len(sz) + 1), 'string')
            sz = ''
            next_addr = self._next_unscanned_addr()
            if (next_addr is None):
                return None
            start_addr = next_addr
        if is_sz:
            next_addr += 1
    instr_alignment = self._initial_state.arch.instruction_alignment
    if ((start_addr % instr_alignment) > 0):
        self._seg_list.occupy(start_addr, (instr_alignment - (start_addr % instr_alignment)), 'alignment')
        start_addr = ((start_addr - (start_addr % instr_alignment)) + instr_alignment)
    return start_addr
