Function at 0x406053
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x40606f
mov ecx, dword [0x428520]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x429578]
mov edx, 0x4274e0
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
lea ebp, [ecx + eax*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebx, edx
jb 0x4060a1
mov eax, ebx
sub eax, edx
sar eax, 1
cmp eax, 0x800
jae 0x4060a1
mov edi, ebx
mov ebx, ecx
mov dword [esp + 0x24], ebx
movzx ecx, word [ebp]
test cx, cx
je 0x4062ae
push esi
push 2
pop esi
mov eax, edi
mov ebx, ebp
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x4062a9
push 4
movzx edx, cx
add ebp, esi
pop eax
cmp dx, ax
jae 0x406282
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 + 0x18], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x14], eax
movzx eax, byte [ebp + 1]
lea ebp, [ebx + 4]
push 2
mov dword [esp + 0x24], eax
or eax, 0x8000
pop ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ebp
cmp dx, bx
jne 0x40622d
cmp dword [0x429604], 0
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x40616f
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x429578]
push edi
lea eax, [eax + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406b22
xor esi, esi
cmp word [edi], si
mov esi, dword [esp + 0x20]
jne 0x406213
push esi
push edi
call fcn.00406053
jmp 0x406213
cmp ecx, 0x25
jne 0x406185
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40620f
cmp ecx, 0x24
jne 0x406198
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x40620f
xor ebp, ebp
mov eax, dword [esp + ebx*4 + 0x10]
dec ebx
mov ecx, dword [0x428530]
and eax, 0xffffffbf
mov esi, eax
mov dword [esp + 0x2c], eax
and esi, 0x8000
test ecx, ecx
je 0x4061c8
push edi
push ebp
push ebp
push eax
push dword [0x428538]
call ecx
test eax, eax
je 0x40620b
push 7
call fcn.00406a91
mov ecx, eax
mov eax, dword [esp + 0x2c]
push esi
movzx eax, al
push eax
push dword [0x428538]
call ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x406202
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x2c]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x40620b
xor eax, eax
mov word [edi], ax
test ebx, ebx
jne 0x40619a
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
xor eax, eax
cmp word [edi], ax
je 0x40625e
cmp esi, 0x1a
jne 0x40625e
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x40625e
cmp edx, 3
jne 0x406266
cmp esi, 0x1d
jne 0x406245
push dword [0x428538]
push edi
call fcn.004067ca
jmp 0x406274
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406cc5
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x406274
push edi
call fcn.00406ee8
jmp 0x406274
cmp edx, 1
jne 0x406274
not esi
push esi
push edi
call fcn.00406053
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
pop esi
jmp 0x406295
jne 0x406290
mov ax, word [ebp]
lea ebp, [ebx + 4]
mov word [edi], ax
jmp 0x406293
mov word [edi], dx
mov eax, esi
movzx ecx, word [ebp]
add edi, eax
mov edx, 0x4274e0
test cx, cx
jne 0x4060b2
mov ebx, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebx, ebx
je 0x4062c0
push edx
push ebx
call fcn.00406cc5
jmp 0x4062c2
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8