Function at 0x405c9a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push ebx
xor ebx, ebx
cmp dword [0x432378], ebx
push esi
lea eax, [ebp - 8]
push edi
mov esi, ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
push eax
je 0x405e63
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40600b
push 0x20
lea eax, [ebp - 0x34]
push ebx
push eax
call fcn.0040e9b0
mov eax, dword [esi]
add esp, 0xc
lea ecx, [ebp - 4]
mov dword [ebp - 0x34], eax
push ecx
push 0x11
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40600b
mov eax, dword [ebp - 4]
mov word [ebp - 0x240], bx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x28], 0x42ab38
mov dword [ebp - 0x24], 0x1047
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40600b
lea ecx, [ebp - 0x240]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x405fff
call fcn.0040a518
cmp word [ebp - 0x240], 0x5c
jne 0x405d77
cmp word [ebp - 0x23e], 0x5c
jne 0x405d77
push ebx
push 0x42ab18
push 0x42aae4
push dword [esi]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x405fff
lea eax, [ebp - 0x240]
push eax
call fcn.0040e8db
cmp eax, 0xc0
pop ecx
jbe 0x405d98
push ebx
push 0x42ab18
push 0x42aabc
jmp 0x405d6a
movzx ecx, word [ebp - 0x240]
mov eax, dword [ecx*8 + 0x44ab38]
mov dword [ebp - 0x14], eax
mov edi, dword [ecx*8 + 0x44ab3c]
and eax, edi
cmp eax, 0xffffffff
jne 0x405dc4
push ebx
push 0x42ab18
push 0x42aa8c
jmp 0x405d6a
mov eax, dword [esi + 0x398]
push ebx
cdq
push 0x100000
push edx
push eax
call fcn.0040f6a0
cmp edi, edx
ja 0x405df3
jb 0x405de3
cmp dword [ebp - 0x14], eax
jae 0x405df3
push ebx
push 0x42ab18
push 0x42aa4c
jmp 0x405d6a
lea eax, [ebp - 0x240]
push eax
call fcn.0040e8db
pop ecx
lea eax, [ebp + eax*2 - 0x240]
lea ecx, [ebp - 0x240]
cmp eax, ecx
jbe 0x405e24
cmp word [eax], bx
jne 0x405e24
cmp word [eax - 2], 0x5c
jne 0x405e24
push 0x42aa2c
jmp 0x405e29
push 0x42aa08
lea eax, [ebp - 0x240]
push eax
call fcn.0040e719
pop ecx
lea eax, [ebp - 0x240]
pop ecx
lea edi, [esi + 8]
push eax
push edi
call fcn.0040e743
pop ecx
pop ecx
push edi
push 0x3fa
push dword [esi]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x405fff
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40600b
push 0x20
lea eax, [ebp - 0x34]
push ebx
push eax
call fcn.0040e9b0
mov eax, dword [esi]
add esp, 0xc
lea ecx, [ebp - 4]
mov dword [ebp - 0x34], eax
push ecx
push 0x11
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40600b
mov eax, dword [ebp - 4]
mov byte [ebp - 0x13c], bl
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x28], 0x42a96c
mov dword [ebp - 0x24], 0x1047
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40600b
lea ecx, [ebp - 0x13c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405fff
call fcn.0040a518
cmp byte [ebp - 0x13c], 0x5c
jne 0x405f17
cmp byte [ebp - 0x13b], 0x5c
jne 0x405f17
push ebx
push 0x42a94c
push 0x42a918
push dword [esi]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405fff
lea eax, [ebp - 0x13c]
push eax
call fcn.0040e860
cmp eax, 0xc0
pop ecx
jbe 0x405f38
push ebx
push 0x42a94c
push 0x42a8f0
jmp 0x405f0a
movsx ecx, byte [ebp - 0x13c]
mov eax, dword [ecx*8 + 0x44ab38]
mov dword [ebp - 0x14], eax
mov edi, dword [ecx*8 + 0x44ab3c]
and eax, edi
cmp eax, 0xffffffff
jne 0x405f64
push ebx
push 0x42a94c
push 0x42a8c0
jmp 0x405f0a
mov eax, dword [esi + 0x398]
push ebx
cdq
push 0x100000
push edx
push eax
call fcn.0040f6a0
cmp edi, edx
ja 0x405f93
jb 0x405f83
cmp dword [ebp - 0x14], eax
jae 0x405f93
push ebx
push 0x42a94c
push 0x42a880
jmp 0x405f0a
lea eax, [ebp - 0x13c]
push eax
call fcn.0040e860
pop ecx
lea eax, [ebp + eax - 0x13c]
lea ecx, [ebp - 0x13c]
cmp eax, ecx
jbe 0x405fc2
cmp byte [eax], bl
jne 0x405fc2
cmp byte [eax - 1], 0x5c
jne 0x405fc2
push 0x42a860
jmp 0x405fc7
push 0x42a840
lea eax, [ebp - 0x13c]
push eax
call fcn.0040e780
pop ecx
lea eax, [ebp - 0x13c]
pop ecx
lea edi, [esi + 0x210]
push eax
push edi
call fcn.0040e770
pop ecx
pop ecx
push edi
push 0x3fa
push dword [esi]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebp - 8]
push dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
cmp dword [ebp - 4], ebx
je 0x40601f
mov eax, dword [ebp - 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 8]
pop edi
pop esi
cmp eax, ebx
pop ebx
je 0x40602f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
leave
ret