BiLookupObjectByIdentifierAndBootEntry

INT64 __fastcall BiLookupObjectByIdentifierAndBootEntry(_QWORD *a1, _QWORD *a2, INT64 a3, _QWORD *a4){
  __int64 *v4; 
  int v6; 
  __int64 v7; 
  v4 = (__int64 *)*a1;
  if( (_QWORD *)*a1 == a1 )
    return 3221226021i64;
  while( 1 )
  {
    v6 = *((_DWORD *)v4 + 12);
    if( (v6 & 4) != 0 )
    {
      v7 = *a2 - v4[2];
      if( *a2 == v4[2] )
        v7 = a2[1] - v4[3];
      if( !v7 && (v6 & 3) != 0 && *((_DWORD *)v4 + 8) == (_DWORD)a3 )
        break;
    }
    v4 = (__int64 *)*v4;
    if( v4 == a1 )
      return 3221226021i64;
  }
  *a4 = v4;
  return 0i64;
}

Referenced by:

BiBuildIdentifierList