Function at 0x406a2d
Capabilities:
Get common file path

Disassembly:
sub esp, 0x24
mov eax, dword [0x40d0fc]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 4], ebx
test eax, eax
jns 0x406a5d
mov ecx, dword [0x473540]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x47b598]
mov edx, 0x46b500
push ebp
push edi
mov edi, edx
lea ebp, [ecx + eax*2]
xor ecx, ecx
cmp ebx, edx
jb 0x406a8a
mov eax, ebx
sub eax, edx
sar eax, 1
cmp eax, 0x4000
jae 0x406a8a
mov edi, ebx
mov dword [esp + 0xc], ecx
mov ebx, ecx
movzx ecx, word [ebp]
test cx, cx
je 0x406cb2
push esi
push 2
pop esi
mov eax, edi
mov ebx, ebp
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x4000
jge 0x406cad
push 4
movzx edx, cx
add ebp, esi
pop eax
cmp dx, ax
jae 0x406c86
movsx esi, byte [ebx + 3]
movsx eax, byte [ebp]
and esi, 0x7f
movzx ecx, byte [ebp]
and eax, 0x7f
shl esi, 7
or esi, eax
mov dword [esp + 0x24], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x20], eax
movzx eax, byte [ebp + 1]
lea ebp, [ebx + 4]
mov dword [esp + 0x2c], eax
or eax, 0x8000
push 2
mov dword [esp + 0x2c], eax
pop eax
mov dword [esp + 0x1c], ebp
cmp dx, ax
jne 0x406c31
cmp dword [0x47b624], 0
push 4
pop ebx
cmovne eax, ebx
test cl, cl
jns 0x406b59
mov ebx, dword [0x47b598]
mov eax, ecx
and eax, 0x40
and ecx, 0x3f
push eax
push edi
lea eax, [ebx + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004078be
xor esi, esi
cmp word [edi], si
mov esi, dword [esp + 0x2c]
jne 0x406c17
push esi
push edi
call fcn.00406a2d
jmp 0x406c17
cmp ecx, 0x25
jne 0x406b6f
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406c13
cmp ecx, 0x24
jne 0x406b85
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x406c13
xor ebp, ebp
mov esi, dword [0x473550]
dec eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + eax*4 + 0x20]
and eax, 0xffffffbf
mov ebx, eax
mov dword [esp + 0x14], eax
and ebx, 0x8000
test esi, esi
je 0x406bc1
push edi
push ebp
push ebp
push eax
push dword [0x473558]
mov ecx, esi
call dword [0x40a2dc]
call esi
test eax, eax
je 0x406c0f
push 7
call fcn.0040782d
mov esi, eax
mov eax, dword [esp + 0x14]
push ebx
movzx eax, al
mov ecx, esi
push eax
push dword [0x473558]
call dword [0x40a2dc]
call esi
mov ebx, eax
test ebx, ebx
je 0x406bfe
push edi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push ebx
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x406c0f
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x406b87
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
xor eax, eax
cmp word [edi], ax
je 0x406c62
cmp esi, 0x1a
jne 0x406c62
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406c62
cmp edx, 3
jne 0x406c6a
cmp esi, 0x1d
jne 0x406c49
push dword [0x473558]
push edi
call fcn.004073b6
jmp 0x406c78
mov eax, esi
shl eax, 0xe
add eax, section..ndata
push eax
push edi
call fcn.00407a7a
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x406c78
push edi
call fcn.00407c90
jmp 0x406c78
cmp edx, 1
jne 0x406c78
not esi
push esi
push edi
call fcn.00406a2d
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
pop esi
jmp 0x406c99
jne 0x406c94
mov ax, word [ebp]
lea ebp, [ebx + 4]
mov word [edi], ax
jmp 0x406c97
mov word [edi], dx
mov eax, esi
movzx ecx, word [ebp]
add edi, eax
mov edx, 0x46b500
test cx, cx
jne 0x406a9b
mov ebx, dword [esp + 0x10]
pop esi
xor eax, eax
mov word [edi], ax
pop edi
pop ebp
test ebx, ebx
je 0x406cc6
push edx
push ebx
call fcn.00407a7a
jmp 0x406cc8
mov eax, edx
mov ecx, dword [esp + 0x24]
pop ebx
xor ecx, esp
call fcn.00408fb1
add esp, 0x24
ret 8