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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x10], 0x80000000
mov dword [ebp - 4], 3
mov dword [ebp - 0x28], pe_nt_image_headers32
push 0
push dword [ebp - 0x28]
push dword [ebp - 4]
push 0
push dword [ebp - 0x40]
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0xffffffff
jne 0x414ddb
mov eax, 0xfffffffe
jmp 0x4150a1
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
add eax, 0xa
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x414e1a
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x4150a1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x44], eax
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x44]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x414e4d
mov eax, 0xffffffff
jmp 0x4150a1
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax]
cmp eax, 0x42
jne 0x414e7b
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax + 1]
cmp eax, 0x4d
je 0x414e97
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff8
jmp 0x4150a1
sub dword [ebp - 0x30], 0xe
mov dword [ebp - 0x34], 0
jmp 0x414eaa
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], eax
jbe 0x414ece
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x44]
mov al, byte [eax + ecx + 0xe]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x44]
mov byte [ecx + edx], al
jmp 0x414ea7
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x10], 0
je 0x414efd
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff0
jmp 0x4150a1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xe]
mov dword [ebp - 0x4c], eax
jmp 0x414f84
mov dword [ebp - 0x3c], 8
jmp 0x414fb1
mov dword [ebp - 0x3c], 0x40
jmp 0x414fb1
mov dword [ebp - 0x3c], 0x400
jmp 0x414fb1
mov dword [ebp - 0x3c], 0
jmp 0x414fb1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff8
jmp 0x4150a1
cmp dword [ebp - 0x4c], 1
je 0x414f2e
cmp dword [ebp - 0x4c], 4
je 0x414f3a
cmp dword [ebp - 0x4c], 8
je 0x414f46
cmp dword [ebp - 0x4c], 0x18
je 0x414f52
jmp 0x414f5e
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
add eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0xc], eax
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
push 0xc
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, 8
jne 0x414ff2
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x41503a
cmp dword [ebp - 0x1c], 0
je 0x41503a
push dword [ebp - 0x24]
call fcn.004150a8
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], eax
push 0
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 8], eax
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
push dword [ebp - 0x24]
push dword [ebp - 0xc]
push 4
push dword [ebp - 0x24]
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x41507d
cmp dword [ebp - 0x1c], 0
je 0x41507d
push 0
push dword [ebp - 8]
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp - 0x20]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4150a1
pop edi
pop esi
pop ebx
leave
ret 8