AslFileMappingCreateFromImageView

INT64 __stdcall AslFileMappingCreateFromImageView(
        UINT64 *FileMappingHandleOut,
        WCHAR *FullPath,
        PVOID ImageViewBase,
        UINT64 ImageViewSize){
  WCHAR **v8; 
  UINT64 v9; 
  int v10; 
  unsigned int v11; 
  _DWORD *v12; 
  int FileKind; 
  if( !FullPath || !*FullPath || !FileMappingHandleOut || !ImageViewBase )
    return 3221225485i64;
  *FileMappingHandleOut = 0i64;
  v8 = (WCHAR **)AslAlloc(FileMappingHandleOut, 0x58ui64, (INT64)ImageViewBase);
  v9 = (UINT64)v8;
  if( v8 )
  {
    v10 = AslStringDuplicate(v8, FullPath);
    v11 = v10;
    if( v10 < 0 )
    {
      AslLogCallPrintf(1ui64, "AslFileMappingCreateFromImageView", 0x13Fui64, "AslStringDuplicate failed [%x]", v10);
    }
    else
    {
      *(_DWORD *)(v9 + 80) = 1;
      *(_QWORD *)(v9 + 48) = 0i64;
      v12 = (_DWORD *)(v9 + 64);
      *(_QWORD *)(v9 + 56) = 0x1000000i64;
      *(_QWORD *)(v9 + 8) = 0i64;
      *(_QWORD *)(v9 + 16) = 0i64;
      *(_QWORD *)(v9 + 24) = ImageViewSize;
      *(_QWORD *)(v9 + 32) = ImageViewBase;
      *(_QWORD *)(v9 + 40) = ImageViewSize;
      if( ImageViewSize )
      {
        FileKind = AslpFileMappingGetFileKind((_QWORD *)(v9 + 8), (int *)(v9 + 64));
        if( FileKind < 0 )
        {
          AslLogCallPrintf(
            1ui64,
            "AslFileMappingCreateFromImageView",
            0x160ui64,
            "AslpFileMappingGetFileKind failed %S [%x]",
            *(const wchar_t **)v9,
            FileKind);
          *v12 = 3;
        }
      }
      else
      {
        *v12 = 1;
      }
      *FileMappingHandleOut = v9;
      v11 = 0;
      v9 = 0i64;
    }
    if( v9 )
      AslFileMappingDelete(v9);
  }
  else
  {
    return(unsigned int)-1073741801;
  }
  return v11;
}

Referenced by:

SdbGetDatabaseMatch