Function at 0x4023b0
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebp, ebp
cmp dword [esp + 0x144], edi
push edi
push edi
push 3
push edi
push 1
mov dword [esp + 0x40], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x48], edi
push 0x80000000
je 0x4023fe
push dword [esp + 0x158]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x40240b
push dword [esp + 0x158]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x402747
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [esp + 0x28], eax
je 0x402747
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [esp + 0x30], eax
je 0x402747
cmp word [eax], 0x4d42
jne 0x402468
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xa]
shl ecx, 0x10
or ecx, edx
lea ebx, [eax + 0xe]
add ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x40246a
mov ebx, eax
push ebx
call fcn.0040235a
movzx esi, ax
mov dword [esp + 0x10], esi
lea eax, [esi*4 + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
cmp ebp, edi
jne 0x4024a6
cmp byte [0x40c220], 0
je 0x402747
push edi
push str.Error
push 0x40a230
jmp 0x4024da
movzx eax, word [ebx + 2]
movzx ecx, word [ebx]
shl eax, 0x10
or eax, ecx
cmp eax, 0xc
je 0x40282d
push 0x28
pop ecx
cmp eax, ecx
je 0x4024ec
cmp byte [0x40c220], 0
je 0x402747
push edi
push str.Error
push str.Unknown_DIB_file_format.
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x402747
mov dword [ebp], ecx
lea edi, [ebp + 0x28]
movzx eax, word [ebx + 6]
movzx ecx, word [ebx + 4]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 4], eax
movzx eax, word [ebx + 0xa]
movzx ecx, word [ebx + 8]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 8], eax
mov ax, word [ebx + 0xc]
mov word [ebp + 0xc], ax
mov ax, word [ebx + 0xe]
mov word [ebp + 0xe], ax
movzx eax, word [ebx + 0x12]
movzx ecx, word [ebx + 0x10]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x10], eax
movzx eax, word [ebx + 0x16]
movzx ecx, word [ebx + 0x14]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x14], eax
movzx eax, word [ebx + 0x1a]
movzx ecx, word [ebx + 0x18]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x18], eax
movzx eax, word [ebx + 0x1e]
movzx ecx, word [ebx + 0x1c]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x1c], eax
movzx eax, word [ebx + 0x22]
movzx ecx, word [ebx + 0x20]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x20], eax
movzx eax, word [ebx + 0x26]
movzx ecx, word [ebx + 0x24]
shl eax, 0x10
or eax, ecx
cmp dword [esp + 0x18], 0
mov ecx, esi
lea esi, [ebx + 0x28]
mov dword [ebp + 0x24], eax
rep movsd dword es:[edi], dword [esi]
jne 0x40259c
mov eax, dword [esp + 0x10]
lea eax, [ebx + eax*4 + 0x28]
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x10]
xor eax, eax
cmp dword [ebp + 0x14], eax
jne 0x4025be
movzx ecx, word [ebp + 0xe]
mov edx, dword [ebp + 4]
imul edx, ecx
add edx, 7
shr edx, 3
imul edx, dword [ebp + 8]
mov dword [ebp + 0x14], edx
cmp dword [ebp + 0x20], eax
jne 0x4025c6
mov dword [ebp + 0x20], esi
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
xor edi, edi
cmp ebx, edi
mov dword [esp + 0x14], ebx
jne 0x4025ec
cmp byte [0x40c220], 0
je 0x402745
push edi
jmp 0x40271a
push 0x2c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x34], esi
je 0x4026ab
mov dword [esi], 0x28
mov eax, dword [ebp + 4]
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi + 8], eax
push edi
cdq
xor eax, edx
push edi
sub eax, edx
mov word [esi + 0xc], 1
imul eax, dword [esi + 4]
mov word [esi + 0xe], 0x18
mov dword [esi + 0x10], edi
lea eax, [eax + eax*2]
mov dword [esi + 0x14], eax
lea eax, [esp + 0x40]
push eax
push edi
push esi
push ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebx, eax
cmp ebx, edi
mov dword [esp + 0x24], ebx
je 0x4026ab
push ebx
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
je 0x4026ab
push edi
push ebp
push dword [esp + 0x20]
push dword [ebp + 8]
push edi
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.GDI32.dll_SetDIBits]
test eax, eax
jne 0x402692
cmp byte [0x40c220], al
je 0x402745
push edi
push str.Error
push str.Image_file_conversion_error.
jmp 0x402724
call dword [sym.imp.GDI32.dll_GdiFlush]
push dword [esi + 0x14]
call fcn.00402b3f
pop ecx
mov ecx, eax
cmp ecx, edi
mov dword [esp + 0x20], ecx
jne 0x4026ba
cmp byte [0x40c220], 0
je 0x402745
jmp 0x402719
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x38]
mov esi, edx
mov dword [esp + 0x10], edi
and esi, 3
cmp dword [ebp + 8], edi
jle 0x402700
xor ebx, ebx
cmp edx, edi
jle 0x4026f1
mov dl, byte [eax + 2]
mov byte [ecx], dl
mov dl, byte [eax + 1]
inc ecx
mov byte [ecx], dl
mov dl, byte [eax]
inc ecx
add eax, 3
mov byte [ecx], dl
mov edx, dword [ebp + 4]
inc ecx
inc ebx
cmp ebx, edx
jl 0x4026d5
add eax, esi
inc dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
cmp ebx, dword [ebp + 8]
jl 0x4026cf
push 0xc
call fcn.00402b3f
cmp eax, edi
pop ecx
mov dword [esp + 0x2c], eax
jne 0x402733
cmp byte [0x40c220], 0
je 0x402745
push edi
push str.Error
push 0x40a230
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x402745
mov ecx, dword [ebp + 4]
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + 8], ecx
xor edi, edi
cmp dword [esp + 0x14], edi
je 0x402757
push dword [esp + 0x14]
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [esp + 0x24], edi
je 0x402767
push dword [esp + 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [esp + 0x34], edi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x402779
push dword [esp + 0x34]
call esi
cmp ebp, edi
je 0x402780
push ebp
call esi
mov edi, dword [esp + 0x30]
test edi, edi
je 0x40278f
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ebp, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x4027a0
push ebp
call esi
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
je 0x4027ac
push ebx
call esi
xor esi, esi
cmp dword [esp + 0x2c], esi
jne 0x40281c
cmp dword [esp + 0x20], esi
je 0x4027c4
push dword [esp + 0x20]
call fcn.00402931
pop ecx
cmp ebx, 0xffffffff
je 0x4027d1
cmp ebp, esi
je 0x4027d1
cmp edi, esi
jne 0x40281c
cmp dword [esp + 0x144], esi
push dword [esp + 0x140]
je 0x4027e8
push str.Failed_to_open_DIB_file__ws._n
jmp 0x4027ed
push str.Failed_to_open_DIB_file__s._n
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp byte [0x40c220], 0
je 0x40281c
push esi
lea eax, [esp + 0x40]
push str.Error
push eax
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret 8
mov dword [ebp], 0x28
movzx eax, word [ebx + 4]
mov dword [ebp + 4], eax
movzx eax, word [ebx + 6]
mov dword [ebp + 8], eax
mov ax, word [ebx + 8]
mov word [ebp + 0xc], ax
mov ax, word [ebx + 0xa]
mov word [ebp + 0xe], ax
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], edi
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x20], esi
test esi, esi
mov dword [ebp + 0x24], esi
lea eax, [ebp + 0x28]
lea edi, [ebx + 0xc]
jle 0x40288d
mov ecx, esi
mov dl, byte [edi + 2]
mov byte [eax + 2], dl
mov dl, byte [edi + 1]
mov byte [eax + 1], dl
mov dl, byte [edi]
and byte [eax + 3], 0
mov byte [eax], dl
add eax, 4
add edi, 3
dec ecx
jne 0x402870
cmp dword [esp + 0x18], 0
jne 0x4025a0
lea eax, [ebx + esi*2]
lea eax, [esi + eax + 0x28]
mov dword [esp + 0x18], eax
jmp 0x4025a0