Function at 0x4021c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c97a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor ebx, ebx
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], ebx
call fcn.004137f0
mov al, byte [ebp + 0xb]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x38], esp
mov dword [ebp - 0xc4], 1
push ebx
mov ecx, esi
mov byte [ebp - 4], 1
mov byte [esi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x425258
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x425258
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
sub esp, 0x10
lea ecx, [ebp - 0x4d]
mov esi, esp
mov dword [ebp - 0x74], esp
push ecx
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.004028a0
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 1
call fcn.00413d60
mov dl, byte [ebp + 0xb]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x24], dl
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0xcc]
push eax
mov byte [ebp - 4], 3
call fcn.004028b0
mov esi, eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
cmp ecx, esi
je 0x40239d
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x4022a3
xor edi, edi
jmp 0x4022ab
mov edi, dword [esi + 8]
sub edi, eax
sar edi, 4
lea ecx, [ebp - 0x24]
call fcn.004130a0
cmp edi, eax
ja 0x4022ef
mov edx, dword [ebp - 0x20]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
call fcn.00413200
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
push ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.004130e0
mov ecx, esi
call fcn.004130a0
mov ecx, dword [ebp - 0x20]
shl eax, 4
add eax, ecx
mov dword [ebp - 0x1c], eax
jmp 0x40239d
mov ecx, esi
call fcn.004130a0
lea ecx, [ebp - 0x24]
mov edi, eax
call fcn.004130c0
cmp edi, eax
ja 0x40234e
mov ebx, dword [esi + 4]
lea ecx, [ebp - 0x24]
call fcn.004130a0
mov edx, dword [ebp - 0x20]
mov edi, eax
mov eax, dword [esi + 4]
push edx
shl edi, 4
add edi, ebx
push edi
push eax
call fcn.00413200
mov ecx, dword [ebp - 0x1c]
mov eax, dword [esi + 8]
add esp, 0xc
push ecx
push eax
push edi
lea ecx, [ebp - 0x24]
call fcn.00413130
mov ecx, esi
call fcn.004130a0
mov ecx, dword [ebp - 0x20]
shl eax, 4
add eax, ecx
xor ebx, ebx
mov dword [ebp - 0x1c], eax
jmp 0x40239d
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
push edx
push eax
lea ecx, [ebp - 0x24]
call fcn.004130e0
mov ecx, dword [ebp - 0x20]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, esi
call fcn.004130a0
cmp eax, ebx
jge 0x402377
xor eax, eax
shl eax, 4
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x20], eax
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
push eax
push ecx
push esi
lea ecx, [ebp - 0x24]
call fcn.00413130
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov edi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
cmp eax, edi
mov byte [ebp - 4], 3
mov esi, eax
je 0x4023bf
push ebx
mov ecx, esi
call fcn.004134d0
add esi, 0x10
cmp esi, edi
jne 0x4023ad
mov eax, dword [ebp - 0x5c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.00415a86
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call fcn.00415a86
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call fcn.00415a86
mov edi, dword [ebp - 0x20]
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x6c], edi
cmp eax, edi
je 0x4027a3
mov edx, dword [0x436a78]
mov byte [ebp - 4], 8
mov al, byte [edx + 0x25d]
test al, al
je 0x402459
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 1
cmp esi, edi
je 0x402450
push ebx
mov ecx, esi
call fcn.004134d0
add esi, 0x10
jmp 0x40243f
mov eax, dword [ebp - 0x20]
push eax
jmp 0x402853
mov eax, dword [edi + 4]
cmp eax, ebx
jne 0x402465
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::operator
push 0x5c
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReverseFind
inc eax
lea ecx, [ebp - 0x80]
push eax
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
push 0x425254
lea ecx, [ebp - 0x28]
call fcn.00415bc4
mov edx, dword [ebp - 0x14]
push 0x5c
lea ecx, [ebp - 0x14]
mov esi, dword [edx - 8]
call sub.MFC42.DLL_CString::ReverseFind
sub esi, eax
lea eax, [ebp - 0x74]
dec esi
lea ecx, [ebp - 0x14]
push esi
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x4c]
cmp byte [ecx], 0x73
jne 0x4024f9
mov byte [ebp - 4], 7
add edi, 0x10
jmp 0x4023ef
mov edx, dword [ebp - 0x14]
push 0x5c
lea ecx, [ebp - 0x14]
mov esi, dword [edx - 8]
call sub.MFC42.DLL_CString::ReverseFind
sub esi, eax
lea eax, [ebp - 0x38]
dec esi
lea ecx, [ebp - 0x14]
push esi
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xb
call fcn.00415cea
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40278f
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::AllocSysString
lea edx, [ebp - 0x44]
mov esi, eax
xor ebx, ebx
push edx
push esi
mov dword [ebp - 0x48], 0x41f8a8
mov dword [ebp - 0x44], ebx
call sub.gdiplus.dll_GdipLoadImageFromFile
mov dword [ebp - 0x40], eax
push esi
mov byte [ebp - 4], 0xc
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x2c]
push eax
push ecx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], 0x64
mov dword [ebp - 0x54], 0x5a
mov dword [ebp - 0x2c], ebx
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, ebx
je 0x40259d
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x30]
push edx
push eax
mov dword [ebp - 0x30], ebx
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, ebx
je 0x4025b4
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x60]
push ecx
push edx
push eax
call fcn.004016b0
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x60]
add esp, 0xc
lea edx, [ebp - 0x2c]
sub eax, edi
sub ecx, esi
push ebx
push ebx
push edx
push eax
mov eax, dword [ebp - 0x44]
push ecx
push eax
mov dword [ebp - 0x2c], ebx
call sub.gdiplus.dll_GdipGetImageThumbnail
cmp eax, ebx
je 0x4025f3
mov dword [ebp - 0x40], eax
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov dword [ebp - 0x34], eax
cmp eax, ebx
mov byte [ebp - 4], 0xd
je 0x4026da
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x2c]
push ecx
push edx
mov ecx, eax
call fcn.004131d0
mov esi, eax
cmp esi, ebx
jne 0x402627
mov eax, dword [ebp - 0x2c]
push eax
call sub.gdiplus.dll_GdipDisposeImage
xor edi, edi
cmp esi, ebx
mov dword [ebp - 0x30], edi
je 0x402643
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x30]
push ecx
push edx
call sub.gdiplus.dll_GdipGetImageGraphicsContext
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x7c], edi
push 0xffffffffffffffff
push edi
mov byte [ebp - 4], 0xe
call sub.gdiplus.dll_GdipGraphicsClear
cmp eax, ebx
je 0x402659
mov dword [ebp - 0x78], eax
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x68]
push eax
push ecx
mov dword [ebp - 0x68], ebx
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, ebx
je 0x402670
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
lea edx, [ebp - 0x34]
push edx
push eax
mov dword [ebp - 0x34], ebx
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, ebx
je 0x402687
mov dword [esi + 8], eax
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x34]
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0x68]
push ecx
push edx
push ebx
push ebx
push eax
push edi
call sub.gdiplus.dll_GdipDrawImageRectI
cmp eax, ebx
je 0x4026ab
mov dword [ebp - 0x78], eax
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x70]
push eax
push ecx
push edx
call sub.gdiplus.dll_GdipGetPropertySize
cmp eax, ebx
je 0x4026c3
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x4026e1
push 2
jmp 0x4026f4
xor esi, esi
jmp 0x40261e
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x44]
push edi
push ecx
push edx
push eax
call sub.gdiplus.dll_GdipGetAllPropertyItems
push eax
lea ecx, [ebp - 0x48]
call fcn.00412f30
mov edx, dword [ebp - 0x64]
xor ecx, ecx
cmp ecx, edx
jae 0x402731
mov eax, ecx
shl eax, 4
add eax, edi
cmp dword [eax], 0x112
jne 0x402783
mov eax, dword [eax + 0xc]
movsx eax, word [eax]
cmp eax, 8
jne 0x402776
mov ecx, dword [esi + 4]
push 3
push ecx
call sub.gdiplus.dll_GdipImageRotateFlip
cmp eax, ebx
je 0x402731
mov dword [esi + 8], eax
push edi
call dword [sym.imp.MSVCRT.dll_free]
lea eax, [ebp - 0x28]
mov ecx, esp
mov dword [ebp - 0x34], esp
push eax
call fcn.00415ce4
push esi
call fcn.00401510
add esp, 8
cmp esi, ebx
je 0x40275b
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov eax, dword [ebp - 0x7c]
push eax
call sub.gdiplus.dll_GdipDeleteGraphics
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x48], 0x41f8a8
push ecx
call sub.gdiplus.dll_GdipDisposeImage
jmp 0x40278f
cmp eax, 6
jne 0x402731
mov edx, dword [esi + 4]
push 1
push edx
jmp 0x402725
inc ecx
jmp 0x402701
mov edi, dword [ebp - 0x6c]
xor ebx, ebx
mov dword [ebp - 4], 7
add edi, 0x10
jmp 0x4023ef
lea edx, [ebp + 8]
push 0x425250
lea eax, [ebp - 0x38]
push edx
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x90]
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [ebp - 0x14]
push ebx
push 0x1001
push ecx
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CFile::Open
lea ecx, [ebp - 0x90]
call sub.MFC42.DLL_CFile::Close
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 7
call fcn.00415ccc
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
cmp esi, eax
mov byte [ebp - 4], 1
mov edi, eax
je 0x402852
push ebx
mov ecx, esi
call fcn.004134d0
add esi, 0x10
cmp esi, edi
jne 0x402840
mov esi, dword [ebp - 0x20]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 0
call fcn.00413860
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret