def _search_for_export_symbols(self, matches):
        ''' Just encapsulating a search that takes place fairly often '''
        pattern = '|'.join(re.escape(match) for match in matches)
        exp = re.compile(pattern)
        symbol_list = []
        try:
            for symbol in self.pefile_handle.DIRECTORY_ENTRY_EXPORT.symbols:
                if symbol.name:
                    symbol_list.append(symbol.name.lower())
            symbol_matches = []
            for symbol in symbol_list:
                if exp.search(symbol):
                    symbol_matches.append(symbol)
            return symbol_matches
        except AttributeError:
            return []
def _search_for_export_symbols ( self , matches ) : pattern = '|' . join ( re . escape ( match ) for match in matches ) exp = re . compile ( pattern ) symbol_list = [ ] try : for symbol in self . pefile_handle . DIRECTORY_ENTRY_EXPORT . symbols : if symbol . name : symbol_list . append ( symbol . name . lower ( ) ) symbol_matches = [ ] for symbol in symbol_list : if exp . search ( symbol ) : symbol_matches . append ( symbol ) return symbol_matches except AttributeError : return [ ]
Just encapsulating a search that takes place fairly often