Hello, I noticed that you are using function_grep.pl to search for a certain function. Have you considered GNU idutils? They can do that and more (and faster):
http://www.gnu.org/software/idutils
It is as simple as
$ cd $WINE_SRC_PATH $ mkid (generate ID database, takes about 4 seconds on my machine for wine) $ gid -r PATTERN
Claudio