HvlpDynamicUpdateMicrocode

INT64 __fastcall HvlpDynamicUpdateMicrocode(VOID *rcx0, UINT64 rdx0){
  int v2; 
  _MDL *Mdl; 
  _MDL *v5; 
  INT16 v7; 
  UINT16 v8; 
  NTSTATUS v9; 
  UINT64 v10; 
  INT64 a1[2]; 
  VOID *a2; 
  int v13; 
  int v14; 
  a1[0] = 0i64;
  v2 = rdx0;
  Mdl = IoAllocateMdl(rcx0, rdx0, 0, 0, 0i64);
  v5 = Mdl;
  if( !Mdl )
    return 3221225626i64;
  MmBuildMdlForNonPagedPool(Mdl);
  HvcallInitInputControl(7, a1);
  LODWORD(a1[0]) |= 0x10000u;
  v14 = 0;
  a2 = rcx0;
  v13 = v2;
  while( 1 )
  {
    LODWORD(v10) = 0;
    v7 = HvcallFastExtended(a1[0], &a2, 0x18ui64, 0i64, v10);
    if( !HvlpHvStatusIsInsufficientMemory(v7) )
      break;
    v9 = HvlpHandleInsufficientMemory();
    if( v9 < 0 )
      goto LABEL_8;
  }
  v9 = HvlpHvToNtStatus(v8);
LABEL_8:
  IoFreeMdl(v5);
  if( v9 >= 0 )
    HvlpLogMicrocodeUpdateStatus();
  return(unsigned int)v9;
}

Referenced by:

HvlUpdateMicrocodeDatabase