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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
push 0x2010
xor esi, esi
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.USER32.dll_LoadImageA]
cmp eax, esi
jne 0x406fef
push ebx
push edi
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push dword [ebp + 8]
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406f24
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push esi
lea ecx, [ebp - 0x2c]
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0xc], esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jl 0x406f09
lea eax, [ebp - 4]
push eax
push 0x48e504
push esi
push edi
push dword [ebp - 0xc]
mov dword [ebp - 4], esi
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
test eax, eax
jl 0x406efd
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push eax
call dword [ecx + 0x1c]
push esi
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
push ebx
call fcn.00406d4b
pop ecx
pop ecx
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push ebx
mov dword [ebp - 0x10], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push dword [ebp - 0x10]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
mov dword [ebp - 0x20], eax
call edi
mov edx, dword [ebp - 0x14]
push esi
neg edx
push edx
push dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push esi
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push esi
push esi
push dword [ebp - 0x20]
push eax
call dword [ecx + 0x20]
push dword [ebp - 0x10]
push dword [ebp - 0x28]
call edi
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
push esi
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0xc], esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x10]
cmp eax, esi
je 0x406f2a
jmp 0x406fed
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x406feb
xor eax, eax
mov word [ebp - 0x44], ax
lea edi, [ebp - 0x42]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
stosd dword es:[edi], eax
lea eax, [ebp - 8]
push eax
push 0xe
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406fe6
cmp dword [ebp - 8], 0xe
jne 0x406fe6
mov eax, 0x4d42
cmp word [ebp - 0x44], ax
jne 0x406fe6
mov eax, dword [ebp - 0x3a]
add eax, 0xfffffff2
push eax
mov dword [ebp - 0x10], eax
call fcn.0045485d
pop ecx
push esi
mov edi, eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406fdf
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jne 0x406fdf
cmp dword [edi], 0x28
jne 0x406fdf
push esi
call dword [sym.imp.USER32.dll_GetDC]
push esi
push esi
lea ecx, [ebp - 0x24]
push ecx
push esi
push edi
push eax
mov dword [ebp - 0x24], esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x28], eax
cmp eax, esi
jne 0x406ff2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call fcn.00450445
pop ecx
push dword [ebp - 4]
call ebx
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret
mov eax, dword [edi + 0x14]
push esi
lea ecx, [ebp - 8]
push ecx
push eax
push dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406fdf
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 8], eax
jne 0x406fdf
push dword [ebp - 4]
call ebx
push edi
call fcn.00450445
mov eax, dword [ebp - 0x28]
pop ecx
jmp 0x406fed