Function at 0x406359
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x406375
mov ecx, dword [0x7c1160]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x7c21b8]
xor edx, edx
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
lea ebp, [ecx + eax*2]
mov ecx, 0x7c0120
push edi
mov edi, ecx
cmp ebx, ecx
jb 0x4063a7
mov eax, ebx
sub eax, ecx
sar eax, 1
cmp eax, 0x800
jae 0x4063a7
mov edi, ebx
mov ebx, edx
mov dword [esp + 0x24], ebx
cmp word [ebp], dx
je 0x4065b4
push esi
push 2
pop ebx
push 4
pop esi
mov eax, edi
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x4065af
movzx edx, word [ebp]
add ebp, ebx
cmp dx, si
jae 0x40658f
movsx esi, byte [ebp + 1]
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]
add ebp, ebx
mov dword [esp + 0x20], eax
or eax, 0x8000
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ebp
cmp dx, bx
jne 0x406535
cmp dword [0x7c2244], 0
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x40646e
mov ebx, dword [0x7c21b8]
mov eax, ecx
and eax, 0x40
and ecx, 0x3f
push eax
push edi
lea eax, [ebx + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406e24
mov esi, dword [esp + 0x20]
xor ebx, ebx
cmp word [edi], bx
jne 0x406519
push esi
push edi
call fcn.00406359
jmp 0x406514
cmp ecx, 0x25
jne 0x406484
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40650e
cmp ecx, 0x24
jne 0x406497
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x40650e
xor ebp, ebp
mov eax, dword [esp + ebx*4 + 0x10]
dec ebx
mov ecx, dword [0x7c1170]
and eax, 0xffffffbf
mov esi, eax
mov dword [esp + 0x2c], eax
and esi, 0x8000
test ecx, ecx
je 0x4064c7
push edi
push ebp
push ebp
push eax
push dword [0x7c1178]
call ecx
test eax, eax
je 0x40650a
push 7
call fcn.00406d93
mov ecx, eax
mov eax, dword [esp + 0x2c]
push esi
movzx eax, al
push eax
push dword [0x7c1178]
call ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x406501
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 0x40650a
xor eax, eax
mov word [edi], ax
test ebx, ebx
jne 0x406499
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
xor ebx, ebx
cmp word [edi], bx
je 0x40652a
cmp esi, 0x1a
jne 0x40652a
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.004071e9
push 2
pop ebx
jmp 0x40657c
cmp edx, 3
jne 0x40656e
cmp esi, 0x1d
jne 0x40654d
push dword [0x7c1178]
push edi
call fcn.00406aca
jmp 0x40657c
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406fc7
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x40657c
push edi
call fcn.004071e9
jmp 0x40657c
cmp edx, 1
jne 0x40657c
not esi
push esi
push edi
call fcn.00406359
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 4
add eax, eax
mov ecx, 0x7c0120
pop esi
jmp 0x4065a1
jne 0x40659c
mov ax, word [ebp]
add ebp, ebx
mov word [edi], ax
jmp 0x40659f
mov word [edi], dx
mov eax, ebx
add edi, eax
xor eax, eax
cmp word [ebp], ax
jne 0x4063b8
mov ebx, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebx, ebx
je 0x4065c6
push ecx
push ebx
call fcn.00406fc7
jmp 0x4065c8
mov eax, ecx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8