HalpMcExportAndChargeNeededData

CHAR *__stdcall HalpMcExportAndChargeNeededData(INT64 a1){
  CHAR *v2; 
  INT64 v3; 
  VOID *v4; 
  CHAR *v5; 
  int v6; 
  CHAR *result; 
  UINT64 NumberOfBytes; 

  LODWORD(NumberOfBytes) = 0;
  v2 = HalpMcExportAllData(&NumberOfBytes, a1, PagedPool);
  v5 = v2;
  if( v2 )
  {
    v6 = NumberOfBytes;
    LODWORD(result) = MmObtainChargesToLockPagedPool(v2, (unsigned int)NumberOfBytes, v3, v4);
    *(&CmpDummyThreadEvent + 6880) = (_DWORD)result != 0;
    if( (_DWORD)result )
    {
LABEL_3:
      *(&CmpDummyThreadEvent + 861) = v5;
      *(&CmpDummyThreadEvent + 1726) = v6;
      return result;
    }
    ExFreePoolWithTag(v5, 0x206C6148u);
    result = HalpMcExportAllData(&NumberOfBytes, a1, NonPagedPoolNx);
    v5 = result;
    if( result )
    {
      v6 = NumberOfBytes;
      goto LABEL_3;
    }
  }
  LODWORD(result) = HalpUnloadMicrocode();
  return result;
}

Referenced by:

HalMcFinishMicrocode