BgLibraryEnable

INT64 __fastcall BgLibraryEnable(INT64 a1, CHAR a2){
  unsigned int v3; 
  if( a2 )
    dword_140C13310 |= 0xC00u;
  if( !a1 )
    return(dword_140C13310 & 2) == 0 ? 0xC00000EF : 0;
  if( !a2 && KeGetCurrentIrql() )
    return 3221225473i64;
  BgpFwAcquireLock(a1);
  if( (dword_140C13310 & 1) != 0 )
    v3 = BgpFwLibraryEnable(a1);
  else
    v3 = -1073741637;
  BgpFwReleaseLock();
  return v3;
}

Referenced by:

BgkAcquireDisplayOwnership
BgkNotifyDisplayOwnershipChange