Function at 0x4033a0
Capabilities:
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406bf8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or edi, 0xffffffff
cmp eax, edi
jne 0x4033e3
mov dword [ebp - 4], edi
jmp 0x4038ae
mov eax, dword [esi + 0x14]
mov byte [ebp - 4], 1
test eax, eax
je 0x403410
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CDC::CDC
mov edx, dword [ebp + 8]
mov byte [ebp - 4], 2
mov eax, dword [edx - 8]
test eax, eax
jne 0x40343a
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00406412
mov dword [ebp - 4], edi
jmp 0x4038ae
lea eax, [ebp - 0x20]
push 3
push eax
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push 0x40a0b4
push eax
call edi
add esp, 8
lea ecx, [ebp - 0x20]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4034a9
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 8]
push 0x10
push 0
push 0
push 0
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadImageA]
mov ebx, eax
mov dword [esi + 4], 1
test ebx, ebx
jne 0x403777
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00406412
jmp 0x4038a7
lea edx, [ebp - 0x18]
push 3
push edx
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x40a0b0
push eax
mov byte [ebp - 4], 3
call edi
add esp, 8
test eax, eax
je 0x403524
lea eax, [ebp - 0x20]
push 3
push eax
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push str.jpeg
push eax
call edi
add esp, 8
lea ecx, [ebp - 0x20]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
jne 0x403524
lea ecx, [ebp - 0x1c]
push 3
push ecx
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x40a0a4
push eax
call edi
add esp, 8
lea ecx, [ebp - 0x1c]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403526
mov bl, 1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403498
mov edx, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
je 0x40356c
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x403580
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00406412
mov dword [ebp - 4], ebx
jmp 0x4038ae
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x24]
push 0
push ecx
push edx
push eax
push edi
mov dword [ebp - 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 1
push ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jl 0x403498
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x403498
mov eax, dword [esi + 8]
lea edi, [esi + 8]
test eax, eax
je 0x4035f6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [edi], 0
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
push edi
push 0x408238
push 0
push edx
push eax
call dword [sym.imp.OLEPRO32.DLL_OleLoadPicture]
test eax, eax
jl 0x403498
cmp dword [edi], 0
je 0x403498
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [edi]
xor ebx, ebx
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x18]
mov eax, dword [edi]
lea ecx, [ebp - 0x18]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0x9ec
push 0x58
push eax
mov dword [esi + 0x1c], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edx, dword [ebp - 0x1c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov ebx, eax
mov eax, dword [esi + 0x1c]
push 0x9ec
push 0x5a
push eax
mov dword [ebp - 0x28], ebx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
push 0
push 0
push 0
push str.DISPLAY
mov dword [ebp - 0x20], eax
call dword [sym.imp.GDI32.dll_CreateDCA]
push eax
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CDC::Attach
fild dword [esi + 0x10]
fild dword [ebp - 0x20]
fstp qword [ebp - 0x38]
fild dword [esi + 0xc]
fild dword [ebp - 0x28]
fstp qword [ebp - 0x2c]
fld qword [ebp - 0x38]
fmul st(2)
fdiv st(1)
call sub.MSVCRT.dll__ftol
fld qword [ebp - 0x2c]
fmul st(2)
push eax
fdiv st(1)
call sub.MSVCRT.dll__ftol
mov edx, dword [ebp - 0x44]
push eax
fstp st(0)
push edx
fstp st(0)
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [esi + 0x14], eax
push eax
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x18], eax
push ecx
push ebx
push 0
lea edx, [ebp - 0x58]
push 0
push edx
call dword [sym.imp.USER32.dll_SetRect]
fild dword [esi + 0x10]
fild dword [esi + 0xc]
fld qword [ebp - 0x38]
fmul st(2)
mov eax, dword [edi]
mov edx, dword [ebp - 0x1c]
fdiv st(1)
mov ebx, dword [eax]
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x18]
mov ecx, eax
neg ecx
push ecx
push edx
push eax
push 0
call sub.MSVCRT.dll__ftol
fld qword [ebp - 0x2c]
fmul st(2)
push eax
fdiv st(1)
call sub.MSVCRT.dll__ftol
push eax
mov eax, dword [esi + 0x1c]
push 0
push 0
push eax
mov eax, dword [edi]
fstp st(0)
push eax
fstp st(0)
call dword [ebx + 0x20]
mov eax, dword [edi]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea ecx, [ebp - 0x48]
mov dword [edi], 0
call sub.MFC42.DLL_CDC::DeleteDC
mov dword [esi + 4], 2
jmp 0x403866
push 0
push 0
push 0
push str.DISPLAY
call dword [sym.imp.GDI32.dll_CreateDCA]
push eax
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CDC::Attach
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
push ebx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
lea ecx, [ebp - 0x70]
mov dword [esi + 0x1c], eax
push ecx
push 0x18
push ebx
call dword [sym.imp.GDI32.dll_GetObjectA]
fild dword [esi + 0x10]
fild dword [esi + 0xc]
fild dword [ebp - 0x68]
fmul st(2)
fdiv st(1)
call sub.MSVCRT.dll__ftol
fild dword [ebp - 0x6c]
push eax
fmul st(2)
fdiv st(1)
call sub.MSVCRT.dll__ftol
mov edx, dword [ebp - 0x44]
push eax
fstp st(0)
push edx
fstp st(0)
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [esi + 0x14], eax
push eax
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
lea ecx, [ebp - 0x48]
mov dword [esi + 0x18], eax
call sub.MFC42.DLL_CDC::DeleteDC
fild dword [esi + 0x10]
fild dword [esi + 0xc]
fild dword [ebp - 0x68]
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x6c]
push 0xcc0020
push ecx
fmul st(2)
push edx
push 0
push 0
push edi
fdiv st(1)
call sub.MSVCRT.dll__ftol
fild dword [ebp - 0x6c]
push eax
fmul st(2)
fdiv st(1)
call sub.MSVCRT.dll__ftol
push eax
mov eax, dword [esi + 0x1c]
push 0
push 0
fstp st(0)
push eax
fstp st(0)
call dword [sym.imp.GDI32.dll_StretchBlt]
mov ecx, dword [ebp - 0x28]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00406412
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4