ArbpBuildAlternative

INT64 __fastcall ArbpBuildAlternative(
        _ARBITER_INSTANCE *Arbiter,
        _IO_RESOURCE_DESCRIPTOR *Requirement,
        _ARBITER_ALTERNATIVE *Alternative){
  INT64 result; 
  unsigned int v6; 
  unsigned __int64 Maximum; 
  unsigned __int64 Minimum; 
  char v9; 
  int v10; 
  Alternative->Descriptor = Requirement;
  result = ((__int64(__fastcall *)(_IO_RESOURCE_DESCRIPTOR *, _ARBITER_ALTERNATIVE *, unsigned __int64 *, unsigned __int64 *, unsigned __int64 *))Arbiter->UnpackRequirement)(
             Requirement,
             Alternative,
             &Alternative->Maximum,
             &Alternative->Length,
             &Alternative->Alignment);
  v6 = 0;
  if( (int)result >= 0 )
  {
    Alternative->Flags = 0;
    if( *((_BYTE *)Requirement + 2) == 3 )
    {
      Alternative->Flags = 1;
      v6 = 1;
    }
    Maximum = Alternative->Maximum;
    Minimum = Alternative->Minimum;
    if( Maximum - Alternative->Minimum + 1 == Alternative->Length )
    {
      v6 |= 2u;
      Alternative->Flags = v6;
    }
    v9 = *((_BYTE *)Requirement + 1);
    if( v9 == 3 || (v10 = v6, v9 == 7) )
    {
      v10 = v6;
      if( (*((_WORD *)Requirement + 2) & 0x100) != 0 )
      {
        v10 = v6 | 8;
        Alternative->Flags = v6 | 8;
      }
    }
    if( Maximum < Minimum )
      Alternative->Flags = v10 | 4;
    return 0i64;
  }
  return result;
}

Referenced by:

ArbQueryConflict
ArbRetestAllocation
ArbpBuildAllocationStack