Function at 0x405580
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x421eeb
mov eax, dword fs:[0]
push eax
sub esp, 0xcc8
mov eax, dword [0x42f370]
xor eax, esp
mov dword [esp + 0xcc0], eax
push ebx
push esi
push edi
mov eax, dword [0x42f370]
xor eax, esp
push eax
lea eax, [esp + 0xcd8]
mov dword fs:[0], eax
push 0x54
xor ebx, ebx
lea eax, [esp + 0x1c]
mov edi, ecx
push ebx
push eax
mov dword [esp + 0x1c], edi
mov esi, edx
call fcn.004145e0
mov edx, dword [0x4315cc]
mov ecx, dword [0x4315c8]
add esp, 0xc
xor eax, eax
mov dword [esp + 0x48e], eax
mov dword [esp + 0x492], eax
mov dword [esp + 0x496], eax
mov dword [esp + 0x49a], eax
mov dword [esp + 0x49e], eax
mov dword [esp + 0x4a2], eax
mov dword [esp + 0x4a6], eax
mov dword [esp + 0x4aa], eax
mov dword [esp + 0x4ae], eax
mov word [esp + 0x4b2], ax
mov eax, esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], 0x58
mov dword [esp + 0x18], ecx
mov word [esp + 0x48c], bx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405650
sub eax, edx
sar eax, 1
lea ecx, [eax - 1]
cmp ecx, ebx
jl 0x405672
cmp word [esi + ecx*2], 0x2e
je 0x405672
sub ecx, 1
jns 0x405666
add ecx, 1
sub eax, ecx
push eax
lea eax, [esi + ecx*2]
push eax
lea ecx, [esp + 0x494]
push ecx
call fcn.00412761
add esp, 0xc
mov dword [esp + 0x88], 7
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], bx
push str.MIXIN_TITLE_FILE_ALL0
push 0x4307e4
mov ecx, 0x433620
mov dword [esp + 0xce8], ebx
call fcn.0040b560
lea edx, [esp + 0x78]
push str.MIXIN_TITLE_FILE_ALL1
push edx
mov ecx, 0x433620
call fcn.0040b560
push 0x206
lea eax, [esp + 0x4ca]
push ebx
push eax
mov word [esp + 0x4d0], bx
call fcn.004145e0
mov ecx, dword [esp + 0x90]
mov eax, 8
add esp, 0x1c
cmp dword [esp + 0x88], eax
jae 0x405709
lea ecx, [esp + 0x74]
cmp dword [0x4307fc], eax
mov eax, dword [0x4307e8]
jae 0x40571b
mov eax, 0x4307e8
push ebx
push ecx
push ebx
push eax
lea ecx, [esp + 0x4c4]
push str._s_c_s_c
push ecx
call fcn.00411042
push 0x206
lea eax, [esp + 0x6da]
lea edx, [esp + 0x4d0]
push ebx
push eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], 0x104
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov word [esp + 0x6e0], bx
call fcn.004145e0
add esp, 0x24
push ebx
push 5
lea ecx, [esp + 0x6c4]
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x6bc]
lea eax, [esp + 0x48c]
push ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], 0x200006
mov dword [esp + 0x54], eax
call dword [sym.imp.comdlg32.dll_GetSaveFileNameW]
mov esi, eax
cmp esi, ebx
je 0x405957
mov edx, dword [esp + 0x30]
push edx
mov ecx, 0x4328bc
mov edx, edi
call fcn.00409820
mov edi, dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 4
test eax, eax
jne 0x405855
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x405855
push str.MIXIN_TITLE_CAPTION_ERROR
push 0x4307e4
mov ecx, 0x433620
call fcn.0040b560
mov eax, dword [esp + 0x18]
push eax
push str.MIXIN_TITLE_DIFF_KEY_FAILED
push 0x4307c8
mov ecx, 0x433620
call fcn.0040b560
mov ecx, dword [0x4307e8]
mov eax, 8
add esp, 0x14
cmp dword [0x4307fc], eax
jae 0x405834
mov ecx, 0x4307e8
cmp dword [0x4307e0], eax
mov eax, dword [0x4307cc]
jae 0x405846
mov eax, 0x4307cc
push 0x10
push ecx
mov ecx, dword [0x4315c8]
push eax
push ecx
call edi
xor esi, esi
push 0x400
lea edx, [esp + 0x8c9]
push ebx
push edx
mov byte [esp + 0x8d0], bl
call fcn.004145e0
mov ecx, dword [0x432cc0]
add esp, 0xc
lea eax, [esp + 0x8c4]
push eax
push ecx
mov ecx, 0x432cc8
call fcn.00408810
push 0x3fc
xor eax, eax
lea edx, [esp + 0x9c]
push ebx
push edx
mov byte [esp + 0xa0], bl
mov word [esp + 0xa1], ax
mov byte [esp + 0xa3], al
call fcn.004145e0
mov eax, dword [0x432cc0]
mov ecx, dword [0x432cc4]
add esp, 0x14
push eax
push ecx
lea ebx, [esp + 0x8cc]
lea eax, [esp + 0x94]
call fcn.00408950
lea edx, [esp + 0x94]
push edx
mov edx, dword [esp + 0x3c]
push edx
mov ecx, ebx
call fcn.004090f0
add esp, 0x10
test eax, eax
jne 0x405957
push str.MIXIN_TITLE_CAPTION_ERROR
push 0x4307e4
mov ecx, 0x433620
call fcn.0040b560
push str.MIXIN_TITLE_ENCRYPT_FAILED
push 0x4307c8
mov ecx, 0x433620
call fcn.0040b560
mov ecx, dword [0x4307e8]
mov eax, 8
add esp, 0x10
cmp dword [0x4307fc], eax
jae 0x405937
mov ecx, 0x4307e8
cmp dword [0x4307e0], eax
mov eax, dword [0x4307cc]
jae 0x405949
mov eax, 0x4307cc
push 0x10
push ecx
push eax
mov eax, dword [0x4315c8]
push eax
call edi
xor esi, esi
cmp dword [esp + 0x88], 8
jb 0x40596e
mov ecx, dword [esp + 0x74]
push ecx
call fcn.00410f70
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0xcd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xcc0]
xor ecx, esp
call fcn.004110f4
mov esp, ebp
pop ebp
ret