Function at 0x416940
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
mov edx, dword [esp + 8]
push 0x420818
push eax
mov dword fs:[0], esp
sub esp, 0x20
test edx, edx
push ebx
push ebp
push esi
push edi
je 0x416c72
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jb 0x416c72
mov eax, dword [esp + 0x44]
test eax, eax
je 0x416c72
push 0x42804c
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x416c72
push 2
push 0
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov ebx, eax
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x4169d7
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x416c72
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
test ebp, ebp
jne 0x4169fa
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x416c72
push 0
push 0
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push ebx
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
lea eax, [esp + 0x18]
xor ebx, ebx
push eax
push ebx
push edi
mov dword [esp + 0x24], ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x416c6b
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x416c6b
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], ebx
push ecx
push 0x424270
push ebx
push ebx
push eax
call dword [sym.imp.OLEPRO32.DLL_OleLoadPicture]
test eax, eax
jne 0x416c61
cmp dword [esp + 0x40], ebx
je 0x416c61
mov eax, dword [esp + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x14]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, eax
push edi
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
cmp esi, ebx
je 0x416c72
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x58
push esi
call ebx
push 0x5a
push esi
mov ebp, eax
call ebx
push esi
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [esp + 0x4c]
mov edi, dword [sym.imp.KERNEL32.dll_MulDiv]
test esi, esi
jne 0x416af5
mov eax, dword [esp + 0x10]
push 0x9ec
push ebp
push eax
call edi
mov esi, eax
mov ebx, dword [esp + 0x50]
test ebx, ebx
jne 0x416b10
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push 0x9ec
push ecx
push edx
call edi
mov ebx, eax
mov ebp, 1
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
mov dword [esp + 0x50], eax
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_GetWindowDC]
push eax
call sub.MFC42.DLL_CDC::FromHandle
mov edi, eax
test edi, edi
je 0x416c30
lea ecx, [esp + 0x20]
call fcn.0041e89a
mov eax, dword [edi + 4]
mov dword [esp + 0x38], 0
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CDC::Attach
mov ecx, dword [edi + 4]
push ebx
push esi
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebp, dword [esp + 0x44]
push eax
mov ecx, ebp
call sub.MFC42.DLL_CGdiObject::Attach
mov eax, dword [ebp + 4]
mov edx, dword [esp + 0x24]
push eax
push edx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x4c], eax
cmp esi, ecx
jne 0x416b9e
mov eax, dword [esp + 0x14]
cmp ebx, eax
je 0x416bb1
push 4
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CDC::SetStretchBltMode
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x48]
push 0
test edx, edx
mov edx, dword [esp + 0x44]
je 0x416bdf
mov ebp, eax
mov edx, dword [edx]
neg ebp
push ebp
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x34]
push 0
push ebx
push esi
push 0
push 0
push eax
push ecx
call dword [edx + 0x20]
jmp 0x416bf6
mov ebp, dword [edx]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push 0
push 0
push ebx
push esi
push 0
push 0
push eax
push edx
call dword [ebp + 0x20]
mov ebp, eax
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x416c03
mov eax, dword [eax + 4]
mov ecx, dword [edi + 4]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov eax, dword [esp + 0x50]
mov edx, dword [edi + 4]
push edx
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov eax, dword [esp + 0x40]
push eax
mov edx, dword [eax]
call dword [edx + 8]
test ebp, ebp
jne 0x416c72
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x416c72
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret