Function at 0x40fc10
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x43381b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7d4
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x3e5]
mov byte [esp + 0x3e4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x5e5]
mov byte [esp + 0x5e4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString_1
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd9]
mov byte [esp + 0xd8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1dd]
mov byte [esp + 0x1dc], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x2e1]
mov byte [esp + 0x2e0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x75]
mov byte [esp + 0x74], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x7f4]
mov byte [esp + 0x14], bl
mov dword [esp + 0x15], ebx
mov dword [esp + 0x7ec], ebx
mov edx, dword [eax]
cmp dword [edx - 8], ebx
je 0x40fd80
lea esi, [ebp + 0x18]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x40fd21
lea ecx, [esp + 0x74]
lea eax, [esp + 0xd8]
push ecx
push esi
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [ebp + 0x7c]
push eax
push esi
lea edx, [eax + 1]
lea eax, [esp + 0x3ec]
push str._s__ld
push eax
mov dword [ebp + 0x7c], edx
call edi
lea ecx, [esp + 0x84]
lea edx, [esp + 0x3f4]
push ecx
lea eax, [esp + 0xec]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
lea edx, [esp + 0x30]
push str._s_s_s_s
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x38]
add esp, 0x28
mov ecx, ebp
push eax
call fcn.0040ff30
test eax, eax
jne 0x40fd27
push ebx
lea ecx, [esp + 0x5e8]
push ebx
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x3e4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2e0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x16
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x3e4]
cmp eax, ebx
mov dword [esp + 0x1c], 0x58
mov dword [esp + 0x50], 0x806
mov dword [esp + 0x28], str.JPEG_Files__.jpg_
mov dword [esp + 0x58], 0x4422f4
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0x200
jne 0x40fe09
mov dword [esp + 0x20], ebx
jmp 0x40fe10
mov edx, dword [eax + 0x20]
mov dword [esp + 0x20], edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.comdlg32.dll_GetSaveFileNameA]
test eax, eax
jne 0x40fe3a
lea ecx, [esp + 0x10]
mov dword [esp + 0x7ec], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x40ff09
mov edx, dword [esp + 0x7f4]
lea ecx, [esp + 0x3e4]
push ecx
push 0x441c04
push edx
call sub.MFC42.DLL_CString::Format
lea eax, [esp + 0x80]
lea ecx, [esp + 0x1e8]
push eax
lea edx, [esp + 0xe8]
push ecx
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x3fc]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x20
lea esi, [esp + 0x1dc]
lea eax, [esp + 0x2e0]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40feb4
cmp cl, bl
je 0x40feb0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40feb4
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40fe90
xor eax, eax
jmp 0x40feb9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40fee7
lea edi, [esp + 0x1dc]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x7c], ebx
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x10]
mov dword [ebp + 0x80], eax
mov esi, eax
mov dword [esp + 0x7ec], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x7e4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x7e0
ret 4