bsearch

void *__cdecl bsearch(
        const void *Key,
        const void *Base,
        size_t NumOfElements,
        size_t SizeOfElements,
        int (__cdecl *PtFuncCompare)(const void *, const void *)){
  size_t v6; 
  char *v7; 
  char *v8; 
  size_t v10; 
  bool v11; 
  char *v12; 
  int v13; 
  v6 = NumOfElements;
  v7 = (char *)Base + SizeOfElements * (NumOfElements - 1);
  v8 = (char *)Base;
  if( (Base || !NumOfElements) && SizeOfElements && PtFuncCompare )
  {
    while( v8 <= v7 )
    {
      v10 = v6 >> 1;
      if( !(v6 >> 1) )
      {
        if( !v6 )
          return 0i64;
        if( ((unsigned int(__fastcall *)(const void *, char *))PtFuncCompare)(Key, v8) )
          return 0i64;
        return v8;
      }
      v11 = (v6 & 1) == 0;
      v6 = v10 - 1;
      if( !v11 )
        v6 = v10;
      v12 = &v8[SizeOfElements * v6];
      v13 = ((__int64(__fastcall *)(const void *, char *))PtFuncCompare)(Key, v12);
      if( !v13 )
        return &v8[SizeOfElements * v6];
      if( v13 >= 0 )
      {
        v8 = &v12[SizeOfElements];
        v6 = v10;
      }
      else
      {
        v7 = &v12[-SizeOfElements];
      }
    }
  }
  else
  {
    xHalTimerWatchdogStop(0i64, 0i64);
  }
  return 0i64;
}

Referenced by:

DownLevelGetParentLanguageName
DownLevelLangIDToLanguageName
DownLevelLanguageNameToLangID
EtwpIsGuidAllowed
sub_1407A1CEC