Function at 0x140021970
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0xb0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x140067030]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rdi, rcx
mov edx, 1
call fcn.140020820
cmp byte [rdi + 0x1840], 0
jne 0x140021e18
lea r13, [0x140000000]
mov rdx, qword [rdi + 0x1698]
xor esi, esi
cmp rdx, qword [r13 + 0x40f30]
jne 0x1400219ed
mov rdx, qword [rdi + 0x16a0]
cmp rdx, qword [r13 + 0x40f38]
jne 0x1400219ed
mov eax, esi
jmp 0x1400219f2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140021a85
mov rdx, qword [rdi + 0x1698]
cmp rdx, qword [r13 + 0x40f40]
jne 0x140021a1e
mov rdx, qword [rdi + 0x16a0]
cmp rdx, qword [r13 + 0x40f48]
jne 0x140021a1e
mov eax, esi
jmp 0x140021a23
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140021a85
mov rdx, qword [rdi + 0x1698]
cmp rdx, qword [r13 + 0x40f20]
jne 0x140021a4b
mov rdx, qword [rdi + 0x16a0]
cmp rdx, qword [r13 + 0x40f28]
jne 0x140021a4b
mov eax, esi
jmp 0x140021a50
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140021a85
mov rdx, qword [rdi + 0x1698]
cmp rdx, qword [r13 + 0x40f10]
jne 0x140021a78
mov rdx, qword [rdi + 0x16a0]
cmp rdx, qword [r13 + 0x40f18]
jne 0x140021a78
mov eax, esi
jmp 0x140021a7d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x140021e18
lea rdx, [rsp + 0x40]
mov rcx, qword [sym.imp.if.dll_struct__GUID_const_ImageFile::DEFAULT_FILE_FORMAT]
mov eax, dword [rcx]
mov dword [rdx], eax
mov eax, dword [rcx + 4]
mov dword [rdx + 4], eax
mov eax, dword [rcx + 8]
mov dword [rdx + 8], eax
mov eax, dword [rcx + 0xc]
mov dword [rdx + 0xc], eax
mov byte [rsp + 0x50], sil
mov rax, qword [sym.imp.if.dll_unsigned_int_const_ImageFile::DEFAULT_JPEG_QUALITY]
mov ecx, dword [rax]
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x58], 1
mov rax, qword [sym.imp.if.dll_double_const_ImageFile::DEFAULT_DPI]
movsd xmm0, qword [rax]
movsd qword [rsp + 0x60], xmm0
mov dword [rsp + 0x68], 8
mov rax, qword [sym.imp.if.dll_unsigned_int_const_ImageFile::METADATA_CATEGORY_NONE]
mov ecx, dword [rax]
mov dword [rsp + 0x6c], ecx
mov byte [rsp + 0x70], sil
mov byte [rsp + 0x71], 1
mov byte [rsp + 0x72], 1
mov qword [rsp + 0x78], rsi
lea rcx, [rsp + 0x80]
call qword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea rcx, [rsp + 0x88]
call qword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
mov dword [rsp + 0x90], 1
mov dword [rsp + 0x94], 1
lea rcx, [rdi + 0x16a8]
call qword [sym.imp.if.dll_unsigned_int___cdecl_ImageFile::BitsPerPixelFromPixelFormat_struct__GUID_const____ptr64_]
mov r11d, eax
lea rax, [rsp + 0x40]
mov ecx, dword [rdi + 0x1698]
mov dword [rax], ecx
mov ecx, dword [rdi + 0x169c]
mov dword [rax + 4], ecx
mov ecx, dword [rdi + 0x16a0]
mov dword [rax + 8], ecx
mov ecx, dword [rdi + 0x16a4]
mov dword [rax + 0xc], ecx
mov ecx, dword [rdi + 0x16e0]
mov dword [rsp + 0x58], ecx
movsd xmm0, qword [rdi + 0x16e8]
movsd qword [rsp + 0x60], xmm0
mov eax, dword [rdi + 0x16f0]
mov dword [rsp + 0x68], eax
mov eax, dword [rdi + 0x1450]
mov dword [rsp + 0x90], eax
mov eax, dword [rdi + 0x1454]
mov dword [rsp + 0x94], eax
cmp r11d, 0x10
je 0x140021bb4
cmp r11d, 0x30
jae 0x140021bb4
mov byte [rsp + 0x50], 0
jmp 0x140021bb9
mov byte [rsp + 0x50], 1
lea rbx, [rdi + 0x16f8]
mov rcx, rbx
call qword [sym.imp.ip.dll_public:_int___cdecl_ImageProcess::ColorProfile::Profile::IsValid_void_const___ptr64]
test eax, eax
je 0x140021bd4
mov qword [rsp + 0x78], rbx
jmp 0x140021bdf
call qword [sym.imp.ip.dll_class_ImageProcess::ColorProfile::Profile_const____ptr64___cdecl_ImageProcess::ColorProfile::GetSRGBProfile_void_]
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x72], 0
cmp dword [rdi + 0x1960], 0
jne 0x140021d25
cmp qword [rdi + 0x1838], 8
jb 0x140021c04
mov rcx, qword [rdi + 0x1820]
jmp 0x140021c0b
lea rcx, [rdi + 0x1820]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140021d25
cmp dword [rdi + 0x1964], 0
jne 0x140021d25
lea rcx, [rsp + 0x30]
call qword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
nop
cmp qword [rdi + 0x10b8], 0
je 0x140021c7d
cmp qword [rdi + 0x1838], 8
jb 0x140021c4f
mov rbx, qword [rdi + 0x1820]
jmp 0x140021c56
lea rbx, [rdi + 0x1820]
lea rcx, str.IDS_MSG_OVERWRITE_FILE
call qword [sym.imp.PECtrl.dll_wchar_t_const____ptr64___cdecl_PECTRL::GetDictItem_wchar_t_const____ptr64_]
mov r8, rax
mov r9, rbx
lea rdx, str._s_n__s_
lea rcx, [rsp + 0x30]
call qword [sym.imp.mfc90u.dll_COleServerDoc::XOleObject::EnumAdvise]
jmp 0x140021cd1
cmp qword [rdi + 0x1838], 8
jb 0x140021c90
mov rbp, qword [rdi + 0x1820]
jmp 0x140021c97
lea rbp, [rdi + 0x1820]
lea rcx, str.IDS_MSG_WATERMART_ADDED
call qword [sym.imp.PECtrl.dll_wchar_t_const____ptr64___cdecl_PECTRL::GetDictItem_wchar_t_const____ptr64_]
mov rbx, rax
lea rcx, str.IDS_MSG_OVERWRITE_FILE
call qword [sym.imp.PECtrl.dll_wchar_t_const____ptr64___cdecl_PECTRL::GetDictItem_wchar_t_const____ptr64_]
mov r8, rax
mov qword [rsp + 0x20], rbp
mov r9, rbx
lea rdx, str._s___s__n__s_
lea rcx, [rsp + 0x30]
call qword [sym.imp.mfc90u.dll_COleServerDoc::XOleObject::EnumAdvise]
lea r8, [rdi + 0x1964]
mov edx, 0x24
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.PECtrl.dll_public:_static_int___cdecl_PECTRL::CMessageBox::Show_wchar_t_const____ptr64__unsigned_int__int____ptr64_]
cmp eax, 6
je 0x140021d1a
lea rcx, [rsp + 0x30]
call qword [sym.imp.mfc90u.dll_CView::CView]
nop
lea rcx, [rsp + 0x88]
call qword [sym.imp.mfc90u.dll_CView::CView]
lea rcx, [rsp + 0x80]
call qword [sym.imp.mfc90u.dll_CView::CView]
jmp 0x140021e20
lea rcx, [rsp + 0x30]
call qword [sym.imp.mfc90u.dll_CView::CView]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.PECtrl.dll_public:_void___cdecl_PECTRL::CPhotoEditorApp::CloseToolsPanel_unsigned_short_int____ptr64]
cmp qword [rdi + 0x1838], 8
jb 0x140021d43
mov rdx, qword [rdi + 0x1820]
jmp 0x140021d4a
lea rdx, [rdi + 0x1820]
lea r8, [rsp + 0x40]
mov rcx, rdi
call fcn.14001e8f0
test eax, eax
je 0x140021dfa
mov dword [rdi + 0x1960], 1
cmp dword [rdi + 0x5790], 0
je 0x140021dfa
mov dword [rdi + 0x5790], esi
mov rdx, qword [rdi + 0x1998]
cmp rdx, qword [r13 + 0x67ba8]
jne 0x140021d9c
mov rdx, qword [rdi + 0x19a0]
cmp rdx, qword [r13 + 0x67bb0]
je 0x140021da3
sbb eax, eax
sbb eax, 0xffffffff
mov esi, eax
test esi, esi
je 0x140021dbc
xor r8d, r8d
mov rdx, qword [rdi + 0x1690]
mov rcx, rdi
call qword [sym.imp.PECtrl.dll_public:_void___cdecl_PECTRL::CPhotoEditorApp::UpdateMainWndTitle_wchar_t_const____ptr64__int____ptr64]
jmp 0x140021dca
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.PECtrl.dll_public:_void___cdecl_PECTRL::CPhotoEditorApp::UpdateMainWndTitle_wchar_t_const____ptr64__int____ptr64]
mov rcx, qword [rdi + 0x1ea0]
test rcx, rcx
je 0x140021dfa
call qword [sym.imp.PECtrl.dll_public:_int___cdecl_PECTRL::CBaseWnd::IsWindow_void_const___ptr64]
test eax, eax
je 0x140021dfa
mov rcx, qword [rdi + 0x1ea0]
add rcx, 0x35d8
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x2a0]
nop
lea rcx, [rsp + 0x88]
call qword [sym.imp.mfc90u.dll_CView::CView]
lea rcx, [rsp + 0x80]
call qword [sym.imp.mfc90u.dll_CView::CView]
jmp 0x140021e20
mov rcx, rdi
call fcn.140021e50
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1400372b0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret