Function at 0x402460
Capabilities:
Get common file path

Disassembly:
sub esp, 0x220
mov eax, dword [0x434480]
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 0x4024c0
test dl, dl
je 0x4024bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4024c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4024a0
xor eax, eax
jmp 0x4024c5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4024dd
mov ebp, dword [0x4343d0]
mov eax, 0x4343d0
mov esi, 0x19
xor edi, edi
jmp 0x402508
push 8
push str.Programs
push ebp
call fcn.00412ad0
add esp, 0xc
test eax, eax
jne 0x4026ab
mov ebp, dword [0x4343d4]
mov esi, 0x17
mov eax, 0x4343d4
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 0x40269f
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 0x402563
test edi, edi
js 0x40262a
lea eax, [esp + 0x10]
push eax
push edi
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x40262a
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 0x4025a7
test edi, edi
jns 0x40260f
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_translating_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x4026b1
test edi, edi
js 0x402649
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 0x4025b7
lea ecx, [esp + 0x24]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4025d0
mov eax, dword [str._vim_write_test]
mov dword [ecx], eax
mov eax, dword [0x4289c0]
mov dword [ecx + 4], eax
mov eax, dword [0x4289c4]
mov dword [ecx + 8], eax
mov eax, dword [0x4289c8]
mov dword [ecx + 0xc], eax
lea eax, [esp + 0x24]
push 0x4289cc
push eax
call fcn.00409a71
add esp, 8
test eax, eax
jne 0x402636
lea eax, [esp + 0x18]
or edi, 0xffffffff
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x40269f
mov ebp, dword [esp + 0x20]
jmp 0x402530
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_ITEMIDLIST_for_shell_folder_name:___s__n_n
jmp 0x4026b1
push eax
call fcn.00409628
lea eax, [esp + 0x28]
push eax
call fcn.00414868
add esp, 8
mov eax, dword [esp + 0x1c]
cmp dword [eax], 0
jge 0x402654
mov dword [eax], ebp
mov esi, dword [esp + 0x14]
push 9
push str.Programs_
push esi
call fcn.00412ad0
add esp, 0xc
test eax, eax
jne 0x402698
lea edx, [esi + 8]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x402671
sub edx, esi
dec ebx
nop dword [eax + eax]
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x402680
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 0x4026bb
mov esi, dword [esp + 0x14]
push esi
push str._nERROR_getting_interface_for_shell_folder_name:___s__n_n
jmp 0x4026b1
push ebp
push str._nERROR__internal__unrecognised_shell_folder_name:___s__n_n
call fcn.00404f40
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004060be
add esp, 0x220
ret