Function at 0x402320
Capabilities:
Get common file path

Disassembly:
sub esp, 0x220
mov eax, dword [0x433448]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebx
mov ebx, dword [esp + 0x228]
mov ecx, str.desktop
push ebp
mov ebp, dword [esp + 0x230]
mov eax, ebp
push esi
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], 0
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402380
test dl, dl
je 0x40237c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402380
add eax, 2
add ecx, 2
test dl, dl
jne 0x402360
xor eax, eax
jmp 0x402385
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40239d
mov ebp, dword [0x4333d0]
mov eax, 0x4333d0
mov esi, 0x19
xor edi, edi
jmp 0x4023c8
push 8
push str.Programs
push ebp
call fcn.004127f0
add esp, 0xc
test eax, eax
jne 0x40256f
mov ebp, dword [0x4333d4]
mov esi, 0x17
mov eax, 0x4333d4
lea edi, [esi - 0x15]
mov dword [esp + 0x1c], eax
or eax, 0xffffffff
test ebp, ebp
cmovns edi, eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x4024e9
test ebp, ebp
cmovs ebp, esi
nop dword [eax]
lea eax, [esp + 0x10]
push eax
push ebp
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
je 0x402423
test edi, edi
js 0x4024f8
lea eax, [esp + 0x10]
push eax
push edi
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x4024f8
mov ebp, edi
or edi, 0xffffffff
push ebx
push dword [esp + 0x14]
mov dword [esp + 0x28], edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov ecx, dword [esp + 0x18]
mov esi, eax
push dword [esp + 0x10]
push ecx
mov edx, dword [ecx]
mov ecx, dword [edx + 0x14]
call ecx
mov ecx, dword [esp + 0x18]
push ecx
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test esi, esi
jne 0x402467
test edi, edi
jns 0x4024cf
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_translating_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x402575
test edi, edi
js 0x402517
lea edx, [esp + 0x24]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x402477
lea ecx, [esp + 0x24]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402490
mov eax, dword [str._vim_write_test]
mov dword [ecx], eax
mov eax, dword [0x4279a0]
mov dword [ecx + 4], eax
mov eax, dword [0x4279a4]
mov dword [ecx + 8], eax
mov eax, dword [0x4279a8]
mov dword [ecx + 0xc], eax
lea eax, [esp + 0x24]
push 0x4279ac
push eax
call fcn.00409922
add esp, 8
test eax, eax
jne 0x402504
mov ebp, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
or edi, 0xffffffff
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
je 0x4023f0
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_interface_for_shell_folder_name:___s__n_n
jmp 0x402575
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x402575
push eax
call fcn.004094d8
lea eax, [esp + 0x28]
push eax
call fcn.004144fe
add esp, 8
mov eax, dword [esp + 0x1c]
cmp dword [eax], 0
jge 0x402522
mov dword [eax], ebp
mov esi, dword [esp + 0x14]
push 9
push str.Programs_
push esi
call fcn.004127f0
add esp, 0xc
test eax, eax
jne 0x402568
lea edx, [esi + 8]
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x402540
sub edx, esi
dec ebx
nop word [eax + eax]
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x402550
mov ecx, edx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, 1
jmp 0x40257f
push ebp
push str._nERROR__internal__unrecognised_shell_folder_name:___s__n_n
call fcn.00404f50
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004060bb
add esp, 0x220
ret