Function at 0x405bb1
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x1c
test eax, eax
jns 0x405bcd
mov ecx, dword [0x423be0]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x424438]
mov edx, 0x4233a0
push ebx
mov ebx, dword [esp + 0x24]
add ecx, eax
push edi
mov edi, edx
cmp ebx, edx
jb 0x405bf9
mov eax, ebx
sub eax, edx
cmp eax, 0x800
jae 0x405bf9
mov edi, ebx
xor ebx, ebx
mov dword [esp + 0x28], ebx
cmp byte [ecx], 0
je 0x405e1c
push ebp
push esi
mov eax, edi
mov ebp, ecx
sub eax, edx
mov dword [esp + 0x18], ebp
cmp eax, 0x400
jge 0x405e16
mov dl, byte [ecx]
cmp dl, 4
jae 0x405df2
movsx ebx, byte [ebp + 2]
movsx ecx, byte [ecx + 1]
mov esi, ebx
and esi, 0x7f
mov dword [esp + 0x14], ebx
mov eax, ecx
shl esi, 7
and eax, 0x7f
mov dword [esp + 0x20], ecx
or esi, eax
mov dword [esp + 0x28], ebx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x1c], eax
mov eax, ebx
or eax, 0x8000
mov dword [esp + 0x24], eax
cmp dl, 2
jne 0x405d9e
cmp byte [0x4244fc], 0
jne 0x405c8b
mov eax, 0x45a
cmp word [0x4244fe], ax
jae 0x405c8b
cmp ebx, 0x23
je 0x405c8b
cmp ebx, 0x2e
je 0x405c8b
xor edx, edx
jmp 0x405c8e
xor edx, edx
inc edx
cmp dword [0x4244c4], 0
push 2
pop ebp
push 4
pop eax
cmovne ebp, eax
mov dword [esp + 0x34], edx
test cl, cl
jns 0x405cdb
mov eax, ecx
and ecx, 0x3f
add ecx, dword [0x424438]
and eax, 0x40
push eax
push edi
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004065e0
cmp byte [edi], 0
jne 0x405d81
push ebx
push edi
call fcn.00405bb1
jmp 0x405d7c
cmp ecx, 0x25
jne 0x405cf1
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405d7c
cmp ecx, 0x24
jne 0x405d04
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x405d7c
mov eax, dword [esp + ebp*4 + 0x18]
dec ebp
mov ecx, dword [0x423bf0]
and eax, 0xffffffbf
mov esi, eax
mov dword [esp + 0x10], eax
and esi, 0x8000
test ecx, ecx
je 0x405d38
test edx, edx
je 0x405d38
push edi
push 0
push 0
push eax
push dword [0x423bf8]
call ecx
test eax, eax
je 0x405d78
push 7
call fcn.0040654f
mov ecx, eax
mov eax, dword [esp + 0x10]
push esi
movzx eax, al
push eax
push dword [0x423bf8]
call ecx
mov ebx, eax
test ebx, ebx
je 0x405d6d
push edi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push ebx
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x405d78
mov edx, dword [esp + 0x34]
mov byte [edi], 0
test ebp, ebp
jne 0x405d04
mov ebx, dword [esp + 0x14]
cmp byte [edi], 0
je 0x405d92
cmp ebx, 0x1a
jne 0x405d92
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
call fcn.00406957
mov ebp, dword [esp + 0x18]
jmp 0x405de5
cmp dl, 3
jne 0x405dd7
cmp esi, 0x1d
jne 0x405db6
push dword [0x423bf8]
push edi
call fcn.00406272
jmp 0x405de5
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push edi
call fcn.00406774
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x405de5
push edi
call fcn.00406957
jmp 0x405de5
cmp dl, 1
jne 0x405de5
not esi
push esi
push edi
call fcn.00405bb1
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add edi, eax
push 3
jmp 0x405dfc
jne 0x405dff
mov al, byte [ecx + 1]
mov byte [edi], al
inc edi
push 2
pop eax
jmp 0x405e05
mov byte [edi], dl
xor eax, eax
inc edi
inc eax
lea ecx, [eax + ebp]
mov edx, 0x4233a0
cmp byte [ecx], 0
jne 0x405c04
mov ebx, dword [esp + 0x30]
pop esi
pop ebp
mov byte [edi], 0
test ebx, ebx
je 0x405e2c
push edx
push ebx
call fcn.00406774
jmp 0x405e2e
mov eax, edx
pop edi
pop ebx
add esp, 0x1c
ret 8