Function at 0x406b35
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
test eax, eax
jge 0x406b51
mov ecx, dword [0x42b39c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42c3f8]
push ebx
push ebp
push esi
push edi
lea edi, [ecx + eax*2]
mov ecx, dword [esp + 0x24]
mov eax, 0x429360
cmp ecx, eax
mov esi, eax
jb 0x406d7b
mov edx, ecx
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x406d7b
and dword [esp + 0x24], 0
mov esi, ecx
jmp 0x406d7b
mov ecx, esi
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 0x800
jge 0x406d87
push 2
pop ecx
add edi, ecx
cmp bp, 4
jae 0x406d68
mov cl, byte [edi + 1]
mov al, byte [edi]
mov dl, cl
mov bl, al
and edx, 0x7f
and ebx, 0x7f
shl edx, 7
movzx eax, al
or edx, ebx
mov ebx, eax
mov dword [esp + 0x28], edx
mov edx, 0x8000
or ebx, edx
push 2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
movzx ebx, cl
mov ecx, ebx
mov dword [esp + 0x20], ebx
or ecx, edx
mov dword [esp + 0x1c], ecx
pop ecx
add edi, ecx
cmp bp, cx
jne 0x406d0c
xor ebp, ebp
mov dword [esp + 0x28], ecx
cmp dword [0x42c444], ebp
je 0x406c10
mov dword [esp + 0x28], 4
test al, al
jns 0x406c4c
mov ecx, eax
and eax, 0x3f
and ecx, 0x40
push ecx
mov ecx, dword [0x42c3f8]
push esi
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004069c6
cmp word [esi], bp
jne 0x406cf4
push ebx
push esi
call fcn.00406b35
jmp 0x406cef
cmp eax, 0x25
jne 0x406c62
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406cef
cmp eax, 0x24
jne 0x406c77
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x28], ebp
je 0x406cef
dec dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + eax*4 + 0x10]
mov eax, dword [0x42c3c4]
and ebx, 0xffffffbf
mov ebp, ebx
and ebp, 0x8000
test eax, eax
je 0x406caf
push esi
push 0
push 0
push ebx
push dword [0x42c3c8]
call eax
test eax, eax
je 0x406ce9
push 7
call fcn.0040713a
movzx ecx, bl
push ebp
push ecx
push dword [0x42c3c8]
call eax
mov ebx, eax
test ebx, ebx
je 0x406cde
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push ebx
mov ebp, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x406ce9
and word [esi], 0
cmp dword [esp + 0x28], 0
jne 0x406c7d
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
cmp word [esi], bp
je 0x406d04
cmp ebx, 0x1a
jne 0x406d04
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call sub.KERNEL32.dll_lstrcatW
push esi
call fcn.00406da6
jmp 0x406d58
cmp bp, 3
jne 0x406d44
mov ebx, dword [esp + 0x28]
cmp ebx, 0x1d
jne 0x406d29
push dword [0x42c3c8]
push esi
call fcn.00406a3f
jmp 0x406d3a
mov eax, ebx
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.00406af8
add ebx, 0xffffffeb
cmp ebx, 7
jae 0x406d58
jmp 0x406d04
cmp bp, 1
jne 0x406d58
or eax, 0xffffffff
sub eax, dword [esp + 0x28]
push eax
push esi
call fcn.00406b35
push esi
call sub.KERNEL32.dll_lstrlenW
lea esi, [esi + eax*2]
mov eax, 0x429360
jmp 0x406d7b
jne 0x406d76
mov dx, word [edi]
mov word [esi], dx
add esi, ecx
add edi, ecx
jmp 0x406d7b
mov word [esi], bp
add esi, ecx
mov bp, word [edi]
test bp, bp
jne 0x406b8f
and word [esi], 0
cmp dword [esp + 0x24], 0
pop edi
pop esi
pop ebp
pop ebx
je 0x406da0
push eax
push dword [esp + 0x18]
call fcn.00406af8
add esp, 0x10
ret 8