Function at 0x524430
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575b3d
mov eax, dword fs:[0]
push eax
sub esp, 0x6f0
mov eax, dword [0x5c5678]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
push 0x206
xor edi, edi
lea ecx, [ebp - 0x21a]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x21c], ax
call fcn.00545940
add esp, 0xc
push edi
push 0x10
lea edx, [ebp - 0x21c]
push edx
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push edi
lea eax, [ebx + 0x54]
mov ecx, str.PROFILE_PICKER_FILTER
lea esi, [ebp - 0x6fc]
call fcn.004adac0
mov esi, 8
mov dword [ebp - 4], edi
cmp dword [eax + 0x18], esi
jb 0x5244b8
mov eax, dword [eax + 4]
jmp 0x5244bb
add eax, 4
lea ecx, [ebp - 0x6b4]
push ecx
mov ecx, eax
call fcn.00425130
mov byte [ebp - 4], 2
cmp dword [ebp - 0x6e4], esi
jb 0x5244e4
mov edx, dword [ebp - 0x6f8]
push edx
call fcn.0053d782
add esp, 4
push edi
push 0x7c
lea ecx, [ebp - 0x6b4]
xor eax, eax
push ecx
mov dword [ebp - 0x6e4], 7
mov dword [ebp - 0x6e8], edi
mov word [ebp - 0x6f8], ax
call fcn.00511c00
mov edx, dword [ebp - 0x6b4]
push edx
lea esi, [ebp - 0x6a4]
call fcn.0047be00
or dword [ebp - 0x650], 0x20
mov esi, vtable.CFileDialogEx.0
mov dword [ebp - 0x6a4], esi
mov dword [ebp - 0x640], 0x47bc10
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 3
mov dword [ebp - 0x658], eax
call dword [sym.imp.USER32.dll_GetActiveWindow]
lea edi, [ebp - 0x6a4]
call fcn.00527b10
cmp eax, 1
je 0x52456f
mov byte [ebp - 4], 2
mov dword [ebp - 0x6a4], esi
jmp 0x5248c7
lea ecx, [ebp - 0x6ac]
push ecx
lea ecx, [ebp - 0x428]
mov byte [ebx + 0x1dc], 0
call fcn.00425130
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x6ac]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x52494a
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x52494a
mov edx, dword [ebp - 0x6ac]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov esi, eax
test esi, esi
je 0x524939
mov edi, dword [sym.imp.SHLWAPI.dll_StrCmpIW]
push str..jpg
push esi
call edi
test eax, eax
je 0x5245e5
push str..png
push esi
call edi
test eax, eax
jne 0x524939
mov ecx, dword [ebp - 0x6ac]
xor eax, eax
mov dword [ebp - 0x6dc], eax
mov dword [ebp - 0x6d8], eax
mov dword [ebp - 0x6d4], eax
mov dword [ebp - 0x6d0], eax
mov dword [ebp - 0x6cc], eax
mov dword [ebp - 0x6c8], eax
mov dword [ebp - 0x6c4], eax
mov dword [ebp - 0x6c0], eax
lea eax, [ebp - 0x6e0]
push eax
push 0
push ecx
mov dword [ebp - 0x6e0], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x524661
cmp dword [ebp - 0x6c4], 0
ja 0x524650
cmp dword [ebp - 0x6c0], 0x200000
jbe 0x524661
push str.IDS_ITEM_OTHER_PIC_FILE_TOOBIG
mov edi, ebx
call fcn.00526a00
jmp 0x524893
mov edi, dword [ebp - 0x6ac]
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
test esi, esi
je 0x524928
lea edx, [ebp - 0x6a8]
push edx
push edi
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov dword [ebp - 0x6a8], 0
call sub.gdiplus.dll_GdipCreateBitmapFromFile
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x6a8]
mov dword [esi + 4], eax
mov eax, dword [esi + 8]
xor edi, edi
mov dword [esi + 8], edi
cmp eax, edi
jne 0x52491e
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x6a8]
push ecx
push edx
mov dword [ebp - 0x6a8], edi
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, edi
je 0x5246ce
mov dword [esi + 8], eax
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x6b0]
push eax
push ecx
mov dword [ebp - 0x6b0], edi
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, edi
je 0x5246eb
mov dword [esi + 8], eax
mov eax, 0x1f4
cmp dword [ebp - 0x6a8], eax
ja 0x524739
cmp dword [ebp - 0x6b0], eax
ja 0x524739
lea edx, [ebp - 0x6a8]
push esi
push edx
call fcn.00524360
add esp, 8
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x6a8]
cmp dword [eax - 0xc], edi
je 0x52479d
lea eax, [ebp - 0x6a8]
lea edi, [ebp - 0x6ac]
call fcn.00425450
mov byte [ebx + 0x1dc], 1
jmp 0x52479d
push edi
push 1
push 1
push eax
push eax
push esi
call fcn.004d3370
mov edi, eax
add esp, 0x18
mov dword [ebp - 0x6b0], edi
test edi, edi
je 0x5247c3
lea ecx, [ebp - 0x6a8]
push edi
push ecx
call fcn.00524360
add esp, 8
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x6a8]
cmp dword [edx - 0xc], 0
je 0x524793
lea eax, [ebp - 0x6a8]
lea edi, [ebp - 0x6ac]
call fcn.00425450
mov edi, dword [ebp - 0x6b0]
mov byte [ebx + 0x1dc], 1
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x6a8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5247c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
lea edi, [ebx + 0x1d8]
lea eax, [ebp - 0x6ac]
call fcn.00425450
mov ecx, dword [ebx + 0x1a8]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 0x6ac]
push eax
call edx
test al, al
sete al
mov byte [ebx + 0x1e5], al
mov edx, dword [0x5ce94c]
mov eax, dword [edx + 0xc]
mov ecx, 0x5ce94c
mov dword [ebp - 0x6a8], 5
mov dword [ebp - 0x6b8], 6
mov dword [ebp - 0x6bc], 2
call eax
add eax, 0x10
mov dword [ebp - 0x6b0], eax
lea ecx, [ebp - 0x6a8]
push ecx
lea edx, [ebp - 0x6b8]
push edx
lea eax, [ebp - 0x6bc]
push eax
lea ecx, [ebp - 0x6b0]
push ecx
mov byte [ebp - 4], 7
call fcn.004dfc70
push eax
call fcn.004dfcf0
push eax
call fcn.004dfd70
push eax
xor esi, esi
call fcn.004dfdf0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x6b0]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x524893
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x6ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5248b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov dword [ebp - method.CFileDialogEx.virtual_0], vtable.CFileDialogEx.0
mov eax, dword [ebp - 0x690]
test eax, eax
je 0x5248d7
push eax
call fcn.0053bb5a
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x6b4]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x524900
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053d78d
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push str.IDS_ITEM_OTHER_PIC_FILE_CONTENTERR
mov edi, ebx
call fcn.00526a00
jmp 0x524893
push str.IDS_ITEM_OTHER_PIC_FILE_FORMATERR
mov edi, ebx
call fcn.00526a00
jmp 0x524893
push str.IDS_FILE_NOT_FOUND
mov edi, ebx
call fcn.00526a00
jmp 0x524893