PnprIdentifyUnits

INT64 __stdcall PnprIdentifyUnits(
        DEVICE_OBJECT *TargetPdo,
        DEVICE_OBJECT *SparePdo,
        UINT64 *TargetUniqueId,
        UINT64 *SpareUniqueId){
  NTSTATUS v7; 
  UINT64 v8; 
  __int64 v9; 
  int v10; 
  int v11; 
  UINT64 v12; 
  int v13; 
  int v14; 
  UINT64 v15; 
  int v16; 
  int v17; 
  INTERFACE Interface; 
  __int128 v20; 
  unsigned __int8(__fastcall *v21)(void *, UINT64); 
  INTERFACE v22; 
  __int128 v23; 
  __int64 v24; 
  v21 = 0i64;
  v24 = 0i64;
  memset(&Interface, 0, sizeof(Interface));
  v20 = 0i64;
  memset(&v22, 0, sizeof(v22));
  v23 = 0i64;
  v7 = PnpQueryInterface(SparePdo, &GUID_PARTITION_UNIT_INTERFACE_STANDARD, 1u, 0x38u, 0i64, &Interface);
  if( v7 < 0 )
  {
    v8 = PnprContext;
    v9 = 3i64;
    v10 = *(_DWORD *)(PnprContext + 20984);
    if( !v10 )
      v10 = 1300;
    *(_DWORD *)(PnprContext + 20984) = v10;
    v11 = *(_DWORD *)(v8 + 20988);
    if( !v11 )
      v11 = 3;
    *(_DWORD *)(v8 + 20988) = v11;
    goto LABEL_28;
  }
  v7 = PnpQueryInterface(TargetPdo, &GUID_PARTITION_UNIT_INTERFACE_STANDARD, 1u, 0x38u, 0i64, &v22);
  if( v7 >= 0 )
  {
    if( (_QWORD)v23 && (_QWORD)v20 && v21 )
    {
      v7 = ((__int64(__fastcall *)(void *, UINT64 *))v23)(v22.Context, TargetUniqueId);
      if( v7 < 0 )
      {
        v8 = 1332i64;
        goto LABEL_9;
      }
      v7 = ((__int64(__fastcall *)(void *, UINT64 *))v20)(Interface.Context, SpareUniqueId);
      if( v7 < 0 )
      {
        v8 = 1340i64;
        goto LABEL_9;
      }
      if( v21(Interface.Context, *TargetUniqueId) )
      {
        v7 = 0;
        goto LABEL_28;
      }
      v15 = PnprContext;
      v16 = *(_DWORD *)(PnprContext + 20984);
      if( !v16 )
        v16 = 1353;
      v8 = 4i64;
      *(_DWORD *)(PnprContext + 20984) = v16;
      v17 = *(_DWORD *)(v15 + 20988);
      if( !v17 )
        v17 = 4;
      *(_DWORD *)(v15 + 20988) = v17;
    }
    v7 = -1073741811;
    goto LABEL_28;
  }
  v8 = 1312i64;
LABEL_9:
  v12 = PnprContext;
  v9 = 3i64;
  v13 = *(_DWORD *)(PnprContext + 20984);
  if( !v13 )
    v13 = v8;
  *(_DWORD *)(PnprContext + 20984) = v13;
  v14 = *(_DWORD *)(v12 + 20988);
  if( !v14 )
    v14 = 3;
  *(_DWORD *)(v12 + 20988) = v14;
LABEL_28:
  if( Interface.Context )
    ((void(__fastcall *)(void *, UINT64, __int64))Interface.InterfaceDereference)(Interface.Context, v8, v9);
  if( v22.Context )
    ((void(__fastcall *)(void *, UINT64, __int64))v22.InterfaceDereference)(v22.Context, v8, v9);
  return(unsigned int)v7;
}

Referenced by:

No references.