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

Disassembly:
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0x8c]
test ebx, ebx
push ebp
push esi
mov esi, dword [esp + 0x98]
push edi
mov edi, ecx
je 0x414323
cmp word [ebx], 0
je 0x414323
test esi, esi
jne 0x414323
push ebx
call fcn.00414060
add esp, 4
cmp eax, 0x464d4520
jne 0x4141b5
push ebx
call dword [sym.imp.GDI32.dll_GetEnhMetaFileW]
mov esi, eax
push 0
push esi
call dword [sym.imp.GDI32.dll_CopyEnhMetaFileW]
push esi
mov dword [edi + 0x10], eax
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
jmp 0x414427
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x10], ebp
je 0x41421c
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x1000
mov ebx, eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
mov esi, eax
lea eax, [esp + 0x28]
push eax
push ebx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41422b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x84
ret 0xc
sub ebx, 0x16
cmp dword [esi + 0x10], 0x545741
lea eax, [esi + 0x16]
jne 0x414293
movsx edx, word [esi + 6]
movsx ecx, word [esi + 0xa]
sub ecx, edx
movsx edx, word [esi + 8]
mov dword [esp + 0x18], ecx
movsx ecx, word [esi + 0xc]
xor eax, eax
sub ecx, edx
push eax
mov dword [esi + 0x10], eax
mov dword [esp + 0x18], 8
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
lea eax, [esp + 0x14]
push eax
push ebp
lea eax, [esi + 0x16]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
push ebp
push 0
mov dword [edi + 0x10], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ebp, dword [esp + 0x10]
jmp 0x4142a2
push 0
push 0
push eax
push ebx
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
mov dword [edi + 0x10], eax
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0x10], 0
je 0x414310
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
push 0x58
push ebx
call ebp
push 0x5a
push ebx
mov dword [esp + 0x18], eax
call ebp
movzx ecx, word [esi + 0xe]
mov edx, dword [esp + 0x10]
push ecx
movsx ecx, word [esi + 6]
mov ebp, eax
movsx eax, word [esi + 0xa]
push edx
sub eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [edi + 0x14], eax
movzx edx, word [esi + 0xe]
movsx eax, word [esi + 0xc]
movsx ecx, word [esi + 8]
push edx
push ebp
sub eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push ebx
push 0
mov dword [edi + 0x18], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x414427
cmp dword [esi], 0x9ac6cdd7
jne 0x414415
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
push 0x58
push ebx
call ebp
push 0x5a
push ebx
mov dword [esp + 0x18], eax
call ebp
movzx edx, word [esi + 0xe]
movsx ecx, word [esi + 0xa]
push edx
movsx edx, word [esi + 6]
mov ebp, eax
mov eax, dword [esp + 0x14]
push eax
sub ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [edi + 0x14], eax
movzx eax, word [esi + 0xe]
movsx ecx, word [esi + 0xc]
movsx edx, word [esi + 8]
push eax
push ebp
sub ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
push ebx
xor ebp, ebp
push ebp
mov dword [edi + 0x18], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ebx, dword [esp + 0xa0]
mov eax, esi
sub ebx, 0x16
add esi, 0x16
cmp dword [eax + 0x10], 0x545741
push ebp
jne 0x4143f9
movsx edx, word [eax + 6]
movsx ecx, word [eax + 0xa]
sub ecx, edx
movsx edx, word [eax + 8]
mov dword [esp + 0x1c], ecx
movsx ecx, word [eax + 0xc]
sub ecx, edx
mov dword [eax + 0x10], ebp
mov dword [esp + 0x18], 8
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebp
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
lea eax, [esp + 0x14]
push eax
push ebp
push esi
push ebx
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
push ebp
push 0
mov dword [edi + 0x10], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x414405
push ebp
push esi
push ebx
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
mov dword [edi + 0x10], eax
cmp dword [edi + 0x10], 0
jne 0x414427
xor eax, eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
jmp 0x414427
mov ecx, dword [esp + 0xa0]
push esi
push ecx
call dword [sym.imp.GDI32.dll_SetEnhMetaFileBits]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x41421c
cmp dword [edi + 0x14], 0
jne 0x414472
lea edx, [esp + 0x28]
push edx
push 0x6c
push eax
call dword [sym.imp.GDI32.dll_GetEnhMetaFileHeader]
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x34]
test eax, eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
jge 0x414467
mov dword [edi + 0x14], 1
test ecx, ecx
jge 0x414472
mov dword [edi + 0x18], 1
mov eax, dword [edi + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0xc