Function at 0x4063b7
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x4063d3
mov ecx, dword [0x7e75cc]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x7ef638]
mov edx, 0x7df560
push ebx
push ebp
mov ebp, dword [esp + 0x20]
lea ebx, [ecx + eax*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebp, edx
jb 0x406405
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x4008
jae 0x406405
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x24], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x406613
push esi
push 2
pop esi
xor ebp, ebp
mov eax, edi
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x4008
jge 0x40660e
push 4
movzx edx, cx
add ebx, esi
pop eax
cmp dx, ax
jae 0x4065ea
movsx esi, byte [ebx + 1]
movsx eax, byte [ebx]
and esi, 0x7f
movzx ecx, byte [ebx]
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 [ebx + 1]
mov dword [esp + 0x20], eax
or eax, 0x8000
push 2
mov dword [esp + 0x20], eax
pop eax
add ebx, eax
mov dword [esp + 0x10], ebx
cmp dx, ax
jne 0x406590
cmp dword [0x7ef6c4], 0
mov ebx, eax
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x4064d6
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push edi
lea eax, [ecx*2]
add eax, dword [0x7ef638]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406eb2
mov esi, dword [esp + 0x20]
xor eax, eax
cmp word [edi], ax
jne 0x406571
push esi
push edi
call fcn.004063b7
jmp 0x406568
cmp ecx, 0x25
jne 0x4064ed
push 0x2004
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [esp + 0x20]
jmp 0x40656a
cmp ecx, 0x24
jne 0x406504
push 0x2004
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ecx, ecx
mov ebx, ecx
jmp 0x406506
xor ecx, ecx
test ebx, ebx
je 0x406564
mov eax, dword [0x7e75d0]
dec ebx
test eax, eax
je 0x406527
push edi
push ecx
push ecx
push dword [esp + ebx*4 + 0x20]
push dword [0x7e75d8]
call eax
test eax, eax
je 0x406564
lea eax, [esp + 0x2c]
push eax
push dword [esp + ebx*4 + 0x18]
push dword [0x7e75d8]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40655b
push edi
push dword [esp + 0x30]
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 0x406564
xor eax, eax
push eax
mov word [edi], ax
pop ecx
jmp 0x406506
mov esi, dword [esp + 0x20]
xor ebp, ebp
cmp word [edi], bp
je 0x406584
jmp 0x406573
xor ebp, ebp
cmp esi, 0x1a
jne 0x406584
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00407269
mov ebx, dword [esp + 0x10]
jmp 0x4065db
cmp edx, 3
jne 0x4065ca
cmp esi, 0x1d
jne 0x4065a8
push dword [0x7e75d8]
push edi
call fcn.00406b44
jmp 0x4065ba
imul eax, esi, 0x4008
add eax, section..ndata
push eax
push edi
call fcn.0040705d
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x4065db
push edi
call fcn.00407269
jmp 0x4065db
cmp edx, 1
jne 0x4065db
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.004063b7
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
pop esi
lea edi, [edi + eax*2]
jmp 0x4065fd
jne 0x4065f8
mov ax, word [ebx]
mov word [edi], ax
add edi, esi
add ebx, esi
jmp 0x4065fd
mov word [edi], dx
add edi, esi
movzx ecx, word [ebx]
mov edx, 0x7df560
test cx, cx
jne 0x406417
mov ebp, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x406625
push edx
push ebp
call fcn.0040705d
jmp 0x406627
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8