InbvDetermineFunction

_INBV_MODE __stdcall InbvDetermineFunction(_LOADER_PARAMETER_BLOCK *LoaderBlock){
  _INBV_MODE v1; 
  char *LoadOptions; 
  bool v5; 
  char *v6; 
  CHAR v7; 
  __int64 v8; 
  __int64(__fastcall **v9)(); 

  v1 = dword_140C508A0;
  if( !dword_140C508A0 )
  {
    LoadOptions = LoaderBlock->LoadOptions;
    v5 = 1;
    if( LoadOptions )
    {
      v6 = strupr(LoadOptions);
      strstr((UINT8 *)v6, (UINT8 *)"NOVGA", v7);
      v1 = dword_140C508A0;
      v5 = v8 == 0;
    }
    if( LoaderBlock->Extension->BgContext )
    {
      v9 = off_140C02FE0;
      if( !v5 )
        v9 = (__int64(__fastcall **)())((char *)&stru_140C00F40 + 8160);
      qword_140C508A8 = v9;
      v1 = 2 * v5 + 1;
    }
    else
    {
      if( !v5 )
        return v1;
      v1 = Legacy;
      qword_140C508A8 = off_140C02FE0;
    }
    dword_140C508A0 = v1;
  }
  return v1;
}

Referenced by:

InbvDriverInitialize