Function at 0x406892
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
test eax, eax
jge 0x4068ae
mov ecx, dword [0x429568]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42a5b8]
push esi
push edi
lea edi, [ecx + eax*2]
mov ecx, dword [esp + 0x1c]
mov eax, 0x428520
cmp ecx, eax
mov esi, eax
jb 0x4068dd
mov edx, ecx
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x4068dd
and dword [esp + 0x1c], 0
mov esi, ecx
movzx ecx, word [edi]
test cx, cx
je 0x406aeb
push ebx
push ebp
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x406ae9
movzx ebp, cx
push 2
pop ecx
add edi, ecx
cmp bp, 4
jae 0x406aca
mov al, byte [edi]
movzx ecx, byte [edi + 1]
movzx ebx, byte [edi + 1]
and ecx, 0x7f
movzx edx, al
and edx, 0x7f
shl ecx, 7
or ecx, edx
movzx eax, al
mov dword [esp + 0x28], ecx
mov ecx, 0x8000
mov edx, eax
or edx, ecx
mov dword [esp + 0x10], edx
mov edx, ebx
or edx, ecx
push 2
pop ecx
add edi, ecx
cmp bp, cx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edx
jne 0x406a67
xor ebp, ebp
cmp dword [0x42a644], ebp
mov dword [esp + 0x28], ecx
je 0x406970
mov dword [esp + 0x28], 4
test al, al
jns 0x4069ac
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x42a5b8]
push esi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406346
cmp word [esi], bp
jne 0x406a54
push ebx
push esi
call fcn.00406892
jmp 0x406a4f
cmp eax, 0x25
jne 0x4069c2
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406a4f
cmp eax, 0x24
jne 0x4069d7
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x28], ebp
je 0x406a4f
dec dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + eax*4 + 0x10]
mov eax, dword [0x42a580]
and ebx, 0xffffffbf
mov ebp, ebx
and ebp, 0x8000
test eax, eax
je 0x406a0f
push esi
push 0
push 0
push ebx
push dword [0x42a584]
call eax
test eax, eax
je 0x406a49
push 8
call fcn.004065fb
movzx ecx, bl
push ebp
push ecx
push dword [0x42a584]
call eax
mov ebx, eax
test ebx, ebx
je 0x406a3e
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push ebx
mov ebp, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x406a49
and word [esi], 0
cmp dword [esp + 0x28], 0
jne 0x4069dd
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
cmp word [esi], bp
je 0x406a9d
cmp ebx, 0x1a
jne 0x406a9d
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406a9d
cmp bp, 3
jne 0x406aa5
mov ebx, dword [esp + 0x28]
cmp ebx, 0x1d
jne 0x406a84
push dword [0x42a584]
push esi
call fcn.004063bf
jmp 0x406a95
mov eax, ebx
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.00406478
add ebx, 0xffffffeb
cmp ebx, 7
jae 0x406ab9
push esi
call fcn.004064b5
jmp 0x406ab9
cmp bp, 1
jne 0x406ab9
or eax, 0xffffffff
sub eax, dword [esp + 0x28]
push eax
push esi
call fcn.00406892
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x428520
jmp 0x406add
jne 0x406ad8
mov dx, word [edi]
mov word [esi], dx
add esi, ecx
add edi, ecx
jmp 0x406add
mov word [esi], bp
add esi, ecx
movzx ecx, word [edi]
test cx, cx
jne 0x4068eb
pop ebp
pop ebx
and word [esi], 0
cmp dword [esp + 0x1c], 0
pop edi
pop esi
je 0x406b02
push eax
push dword [esp + 0x18]
call fcn.00406478
add esp, 0x10
ret 8