Function at 0x409f50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53b829
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x58dd10]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 4], 0
test edi, edi
jne 0x409fb7
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409fb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a231
lea ecx, [ebp - 0x248]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
je 0x409fe4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x409fa4
mov ecx, 0x5696d2
lea edx, [ebp + 8]
mov byte [ebp - 0x219], 0
call fcn.0040ff50
test al, al
je 0x40a092
push 1
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp + 8]
call fcn.004047f0
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040fe20
mov bl, al
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a044
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40a092
mov ecx, dword [ebp + 8]
mov eax, dword [ecx - 0xc]
dec eax
push eax
lea edx, [ebp - 0x220]
push edx
lea ecx, [ebp + 8]
call fcn.00404870
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00402d70
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a092
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x224]
push ecx
push 0x11
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edx, dword [ebp - 0x224]
xor eax, eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x240], edx
mov edx, dword [ebp + 8]
mov eax, 1
mov dword [ebp - 0x238], 0x5696d8
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], 0x40c670
sub eax, dword [edx - 4]
mov ecx, dword [edx - 8]
or ecx, eax
jge 0x40a126
push 0
lea ecx, [ebp + 8]
call fcn.00401870
mov edx, dword [ebp + 8]
mov dword [ebp - 0x22c], edx
test esi, esi
jne 0x40a138
mov dword [ebp - 0x244], esi
jmp 0x40a141
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x244], ecx
lea edx, [ebp - 0x244]
push edx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
test esi, esi
je 0x40a1e3
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x40a1d5
push 0x5696d2
mov ecx, edi
call fcn.004090b0
lea ecx, [ebp - 0x218]
push ecx
mov ecx, edi
call fcn.00401620
mov ecx, 0x5696d2
mov edx, edi
call fcn.0040ff50
test al, al
je 0x40a1d5
push 1
lea edx, [ebp - 0x220]
push edx
mov ecx, edi
call fcn.004047f0
mov ecx, 0x5696d4
mov edx, eax
mov byte [ebp - 4], 3
call fcn.0040ff50
lea ecx, [ebp - 0x220]
mov bl, al
mov byte [ebp - 4], 0
call fcn.004019f0
test bl, bl
je 0x40a1d5
mov ecx, 0x5696d4
mov ebx, edi
call fcn.004087c0
push esi
mov byte [ebp - 0x219], 1
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x40a1f4
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x248]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
movzx esi, byte [ebp - 0x219]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a22f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051651d
mov esp, ebp
pop ebp
ret 4