bsearch
void *__cdecl bsearch(
const void *Key,
const void *Base,
size_t NumOfElements,
size_t SizeOfElements,
int (__cdecl *PtFuncCompare)(const void *, const void *)){
__int64 v5;
unsigned __int64 v6;
char *v7;
char *v8;
unsigned __int64 v10;
bool v11;
char *v12;
int v13;
v5 = *(_QWORD *)&SizeOfElements;
v6 = *(_QWORD *)&NumOfElements;
v7 = (char *)Base + *(_QWORD *)&SizeOfElements * (*(_QWORD *)&NumOfElements - 1i64);
v8 = (char *)Base;
if( (Base || !*(_QWORD *)&NumOfElements) && *(_QWORD *)&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[v5 * v6];
v13 = ((__int64(__fastcall *)(const void *, char *))PtFuncCompare)(Key, v12);
if( !v13 )
return &v8[v5 * v6];
if( v13 >= 0 )
{
v8 = &v12[v5];
v6 = v10;
}
else
{
v7 = &v12[-v5];
}
}
}
else
{
xHalTimerWatchdogStop(0i64, 0i64);
}
return 0i64;
}Referenced by:
DownLevelGetParentLanguageName
DownLevelLangIDToLanguageName
DownLevelLanguageNameToLangID
EtwpIsGuidAllowed
sub_1407A1CEC