Function at 0x402470
Capabilities:
Get common file path

Disassembly:
sub esp, 0x220
mov eax, dword [0x433480]
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 0x4024d0
test dl, dl
je 0x4024cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4024d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4024b0
xor eax, eax
jmp 0x4024d5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4024ed
mov ebp, dword [0x4333d0]
mov eax, 0x4333d0
mov esi, 0x19
xor edi, edi
jmp 0x402518
push 8
push str.Programs
push ebp
call fcn.004127d0
add esp, 0xc
test eax, eax
jne 0x4026bf
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 0x402639
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 0x402573
test edi, edi
js 0x402648
lea eax, [esp + 0x10]
push eax
push edi
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x402648
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 0x4025b7
test edi, edi
jns 0x40261f
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_translating_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x4026c5
test edi, edi
js 0x402667
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 0x4025c7
lea ecx, [esp + 0x24]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4025e0
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.00409902
add esp, 8
test eax, eax
jne 0x402654
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 0x402540
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_interface_for_shell_folder_name:___s__n_n
jmp 0x4026c5
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x4026c5
push eax
call fcn.004094b8
lea eax, [esp + 0x28]
push eax
call fcn.004144de
add esp, 8
mov eax, dword [esp + 0x1c]
cmp dword [eax], 0
jge 0x402672
mov dword [eax], ebp
mov esi, dword [esp + 0x14]
push 9
push str.Programs_
push esi
call fcn.004127d0
add esp, 0xc
test eax, eax
jne 0x4026b8
lea edx, [esi + 8]
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x402690
sub edx, esi
dec ebx
nop word [eax + eax]
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x4026a0
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 0x4026cf
push ebp
push str._nERROR__internal__unrecognised_shell_folder_name:___s__n_n
call fcn.00404f30
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040609c
add esp, 0x220
ret