Function at 0x414b0a
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 0x414b5f
mov eax, 0xfffffffe
jmp 0x414e25
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 0x414b9e
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x414e25
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 0x414bd1
mov eax, 0xffffffff
jmp 0x414e25
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 0x414bff
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax + 1]
cmp eax, 0x4d
je 0x414c1b
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 0x414e25
sub dword [ebp - 0x30], 0xe
mov dword [ebp - 0x34], 0
jmp 0x414c2e
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], eax
jbe 0x414c52
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 0x414c2b
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x10], 0
je 0x414c81
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 0x414e25
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 0x414d08
mov dword [ebp - 0x3c], 8
jmp 0x414d35
mov dword [ebp - 0x3c], 0x40
jmp 0x414d35
mov dword [ebp - 0x3c], 0x400
jmp 0x414d35
mov dword [ebp - 0x3c], 0
jmp 0x414d35
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 0x414e25
cmp dword [ebp - 0x4c], 1
je 0x414cb2
cmp dword [ebp - 0x4c], 4
je 0x414cbe
cmp dword [ebp - 0x4c], 8
je 0x414cca
cmp dword [ebp - 0x4c], 0x18
je 0x414cd6
jmp 0x414ce2
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 0x414d76
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x414dbe
cmp dword [ebp - 0x1c], 0
je 0x414dbe
push dword [ebp - 0x24]
call fcn.00414e2c
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 0x414e01
cmp dword [ebp - 0x1c], 0
je 0x414e01
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 0x414e25
pop edi
pop esi
pop ebx
leave
ret 8