Function at 0x406119
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
test eax, eax
jns 0x406135
mov ecx, dword [0x476200]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x47e258]
mov edx, 0x46e1c0
push ebx
push ebp
mov ebp, dword [esp + 0x24]
push esi
xor esi, esi
lea ebx, [ecx + eax*2]
push edi
mov edi, edx
cmp ebp, edx
jb 0x406168
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x4000
jae 0x406168
mov edi, ebp
mov ebp, esi
mov dword [esp + 0x2c], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x4063a2
push 2
pop ebp
push 4
pop esi
mov eax, edi
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x4000
jge 0x40639e
movzx edx, cx
add ebx, ebp
cmp dx, si
jae 0x40637a
movsx esi, byte [ebx + 1]
movsx eax, byte [ebx]
and esi, 0x7f
movzx ecx, byte [ebx]
and eax, 0x7f
movzx ebp, byte [ebx + 1]
shl esi, 7
or esi, eax
mov dword [esp + 0x1c], ecx
mov eax, ecx
mov dword [esp + 0x24], ebp
or eax, 0x8000
mov dword [esp + 0x18], eax
mov eax, ebp
or eax, 0x8000
push 2
mov dword [esp + 0x24], eax
pop eax
add ebx, eax
mov dword [esp + 0x14], ebx
cmp dx, ax
jne 0x40631f
mov eax, dword [0x476210]
test eax, eax
jns 0x406208
mov edx, 0x5a04
cmp ax, dx
je 0x406208
cmp ebp, 0x23
je 0x406208
cmp ebp, 0x2e
je 0x406208
xor esi, esi
mov dword [esp + 0x30], esi
jmp 0x406211
xor eax, eax
inc eax
xor esi, esi
mov dword [esp + 0x30], eax
cmp dword [0x47e2e4], 0
push 2
pop ebx
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x406265
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push edi
lea eax, [ecx*2]
add eax, dword [0x47e258]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406ee1
mov ebp, dword [esp + 0x24]
cmp word [edi], si
jne 0x406302
push ebp
push edi
call fcn.00406119
jmp 0x4062fd
cmp ecx, 0x25
jne 0x40627b
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4062fd
cmp ecx, 0x24
jne 0x40628e
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ebx, esi
test ebx, ebx
je 0x4062fd
mov ebp, dword [esp + 0x30]
mov eax, dword [0x476214]
dec ebx
test eax, eax
je 0x4062b7
test ebp, ebp
je 0x4062b7
push edi
push esi
push esi
push dword [esp + ebx*4 + 0x24]
push dword [0x47621c]
call eax
test eax, eax
je 0x4062f9
lea eax, [esp + 0x10]
push eax
push dword [esp + ebx*4 + 0x1c]
push dword [0x47621c]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x4062ea
push edi
push dword [esp + 0x14]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x10]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x4062f7
xor eax, eax
mov word [edi], ax
push eax
pop esi
test ebx, ebx
jne 0x406296
jmp 0x4062f9
xor esi, esi
mov ebp, dword [esp + 0x24]
cmp word [edi], si
je 0x406313
cmp ebp, 0x1a
jne 0x406313
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00407252
mov ebx, dword [esp + 0x14]
jmp 0x406369
cmp edx, 3
jne 0x406358
cmp esi, 0x1d
jne 0x406337
push dword [0x47621c]
push edi
call fcn.00406a5b
jmp 0x406348
mov eax, esi
shl eax, 0xe
add eax, section..ndata
push eax
push edi
call fcn.0040708c
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x406369
push edi
call fcn.00407252
jmp 0x406369
xor eax, eax
inc eax
cmp dx, ax
jne 0x406369
not esi
push esi
push edi
call fcn.00406119
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
pop ebp
push 4
add eax, eax
pop esi
jmp 0x40638b
jne 0x406386
mov ax, word [ebx]
add ebx, ebp
mov word [edi], ax
jmp 0x406389
mov word [edi], dx
mov eax, ebp
movzx ecx, word [ebx]
add edi, eax
mov edx, 0x46e1c0
test cx, cx
jne 0x40617a
mov ebp, dword [esp + 0x2c]
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x4063b4
push edx
push ebp
call fcn.0040708c
jmp 0x4063b6
mov eax, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8