Function at 0x414f15
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 0x414f6a
mov eax, 0xfffffffe
jmp 0x415230
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 0x414fa9
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x415230
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 0x414fdc
mov eax, 0xffffffff
jmp 0x415230
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 0x41500a
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax + 1]
cmp eax, 0x4d
je 0x415026
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 0x415230
sub dword [ebp - 0x30], 0xe
mov dword [ebp - 0x34], 0
jmp 0x415039
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], eax
jbe 0x41505d
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 0x415036
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x10], 0
je 0x41508c
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 0x415230
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 0x415113
mov dword [ebp - 0x3c], 8
jmp 0x415140
mov dword [ebp - 0x3c], 0x40
jmp 0x415140
mov dword [ebp - 0x3c], 0x400
jmp 0x415140
mov dword [ebp - 0x3c], 0
jmp 0x415140
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 0x415230
cmp dword [ebp - 0x4c], 1
je 0x4150bd
cmp dword [ebp - 0x4c], 4
je 0x4150c9
cmp dword [ebp - 0x4c], 8
je 0x4150d5
cmp dword [ebp - 0x4c], 0x18
je 0x4150e1
jmp 0x4150ed
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 0x415181
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x4151c9
cmp dword [ebp - 0x1c], 0
je 0x4151c9
push dword [ebp - 0x24]
call fcn.00415237
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 0x41520c
cmp dword [ebp - 0x1c], 0
je 0x41520c
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 0x415230
pop edi
pop esi
pop ebx
leave
ret 8