Where is source code of advanced search form?
The advanced form is altered in node.module and not in search.module. you can find the below function for advance search in node.module, Please have a look in the below hook:
 function node_form_search_form_alter(&amp;$form, $form_state)