MiPrepareImportList

INT64 __fastcall MiPrepareImportList(_DWORD *a1, _QWORD *a2){
  unsigned int v2; 
  __int64 v4; 
  *a2 = 0i64;
  v2 = 0;
  if( !a1[3] )
    goto LABEL_8;
  do
  {
    if( !*a1 )
      break;
    a1 += 5;
    ++v2;
  }
  while( a1[3] );
  if( !v2 )
  {
LABEL_8:
    v4 = 0i64;
    goto LABEL_6;
  }
  LODWORD(v4) = MiAllocateImportList((_IMAGE_IMPORT_DESCRIPTOR *)v2, (_LOAD_IMPORTS **)a2);
  if( v4 )
  {
LABEL_6:
    *a2 = v4;
    return 0i64;
  }
  return 3221225626i64;
}

Referenced by:

MiResolveImageReferences