Function at 0x10005440
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
test byte [0x10040090], 8
jne 0x100054b0
test edi, edi
je 0x100054a0
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x100054a0
mov eax, dword [edi]
cmp eax, 2
je 0x10005820
movzx ecx, byte [0x10040090]
cmp eax, 1
jne 0x100057a0
and ecx, 8
jne 0x10005880
mov eax, dword [ebp + 0xc]
and eax, 2
test byte [ebp + 0xc], 1
jne 0x100054f0
test eax, eax
jne 0x100057e0
nop
lea esi, [esi]
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], str.___p___lx___lx___lx___n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x10005458
cmp eax, 1
sbb ebx, ebx
and ebx, 0xc0000000
sub ebx, 0x40000000
test esi, esi
mov eax, 1
cmovne eax, esi
mov dword [ebp - 0x18], eax
mov esi, eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathIsRelativeW]
sub esp, 4
test eax, eax
jne 0x10005680
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100058b8
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
sub esp, 8
mov edi, eax
cmp eax, 0xffffffff
je 0x10005900
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, eax
mov esi, eax
test eax, eax
je 0x10005987
lea eax, [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [ebp - 0x18], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
mov edx, dword [ebp - 0x18]
sub esp, 0x14
test eax, eax
je 0x100057f0
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
jne 0x100057f0
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x1c], edx
call sym._cmsOpenProfileFromMem
mov edx, dword [ebp - 0x1c]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x100057fd
mov dword [esp + 4], 0x20
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov edi, eax
test eax, eax
je 0x100059bd
mov dword [eax], 0
mov dword [eax + 8], sym._close_profile
mov dword [eax + 0xc], ebx
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x14], esi
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x1c], eax
mov dword [esp], edi
call sym._alloc_handle
test eax, eax
jne 0x100054a2
mov dword [esp], edi
mov edi, dword [sym.imp.ucrtbase.dll_free]
call edi
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._cmsCloseProfile
mov dword [esp], esi
call edi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x100054a0
lea eax, [ebp - 0x14]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call sym.mscms.dll_GetColorDirectoryW
sub esp, 0xc
test eax, eax
jne 0x100054a0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
jne 0x100054a0
mov ecx, dword [edi + 4]
cmp word [ecx], 0
je 0x10005970
mov eax, ecx
nop
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x100056d0
sub eax, ecx
mov ecx, dword [ebp - 0x14]
lea eax, [eax + ecx + 4]
mov dword [ebp - 0x14], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x100054a0
lea eax, [ebp - 0x14]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], 0
call sym.mscms.dll_GetColorDirectoryW
sub esp, 0xc
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
mov edi, dword [edi + 4]
mov edx, esi
sub esp, 4
cmp word [esi], 0
je 0x10005739
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x10005730
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [edi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x10005740
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x1000555f
and ecx, 2
je 0x100054a0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Invalid_profile_type__lu_n
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_2
xor eax, eax
jmp 0x100054a2
mov ebx, 0xc0000000
jmp 0x10005501
test byte [0x10040090], 2
jne 0x10005940
mov dword [ebp - 0x18], edx
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
sub esp, 4
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x100054a0
mov edx, dword [edi + 8]
mov dword [esp], edx
mov dword [ebp - 0x18], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x100054a0
mov edx, dword [ebp - 0x18]
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 8], edx
call sym._memcpy
mov edx, dword [ebp - 0x18]
mov dword [esp], esi
mov dword [esp + 4], edx
call sym._cmsOpenProfileFromMem
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10005977
mov eax, dword [edi + 8]
mov ebx, 0xffffffff
mov dword [ebp - 0x14], eax
jmp 0x100055f9
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.profile_file:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x10005487
test byte [0x10040090], 4
je 0x100054a0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Unable_to_open_color_profile__lu_n
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x10040090
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
jmp 0x100054a0
test byte [0x10040090], 2
je 0x10005668
mov dword [esp + 0xc], str.Unable_to_retrieve_size_of_color_profile_n
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_2
jmp 0x10005668
mov dword [esp + 0xc], str.Unable_to_read_color_profile_n
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 1
mov dword [ebp - 0x18], edx
call sym._wine_dbg_log.constprop.0_2
mov edx, dword [ebp - 0x18]
jmp 0x100057fd
xor eax, eax
jmp 0x100056db
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
xor eax, eax
jmp 0x100054a2
test byte [0x10040090], 2
je 0x10005668
mov dword [esp + 0xc], str.Unable_to_allocate_memory_for_color_profile_n
mov dword [esp + 8], str.OpenColorProfileW
mov dword [esp + 4], 0x10040090
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_2
jmp 0x10005668
mov edi, dword [sym.imp.ucrtbase.dll_free]
jmp 0x10005658