Function at 0x409077
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
lea esi, [eax + eax]
test eax, eax
jns 0x40909e
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x454de0]
mov esi, dword [eax]
add esi, esi
add esi, dword [0x42f178]
mov ebx, 0x475ee0
cmp dword [ebp - 0x2c], ebx
jb 0x4090c2
mov eax, dword [ebp - 0x2c]
sub eax, ebx
cmp eax, 0x7ffe
ja 0x4090c2
xor eax, eax
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov dx, word [esi]
test dx, dx
je 0x409332
mov eax, ebx
sub eax, 0x475ee0
cmp eax, 0x3ffe
jg 0x409332
cmp dx, 3
ja 0x409310
movsx edi, byte [esi + 3]
mov al, byte [esi + 2]
add esi, 4
shl edi, 7
and eax, 0x7f
and edi, 0x3f80
or edi, eax
mov ax, word [esi - 2]
movzx ecx, al
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x24], ecx
or ch, 0x80
mov dword [ebp - 0x28], ecx
mov ecx, eax
shr cx, 8
mov word [ebp - 0x32], cx
movzx ecx, ah
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x1c], ecx
mov cx, word [ebp - 0x32]
or cx, 0x8000
movzx ecx, cx
mov dword [ebp - 0x20], ecx
cmp dx, 2
jne 0x4092a8
cmp dword [0x41b024], 0
mov edi, 4
jne 0x409154
mov edi, 2
test al, al
jns 0x4091a2
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
and edx, 0x40
add eax, eax
mov dword [esp + 0x10], edx
add eax, dword [0x42f178]
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
call fcn.0040886a
sub esp, 0x14
cmp word [ebx], 0
jne 0x4091d4
mov eax, dword [ebp - 0x38]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00409077
jmp 0x4091d2
cmp dword [ebp - 0x30], 0x25
jne 0x4091bb
mov dword [esp], ebx
mov dword [esp + 4], 0x2000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4091d2
cmp dword [ebp - 0x30], 0x24
jne 0x40922d
mov dword [esp + 4], 0x2000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ecx
push ecx
xor edi, edi
jmp 0x40922d
mov eax, dword [ebp + edi*4 - 0x28]
mov edx, eax
mov dword [ebp - 0x30], eax
and eax, 0x8000
mov dword [ebp - 0x38], eax
mov eax, dword [0x44cda4]
and edx, 0xffffffbf
test eax, eax
jne 0x409234
mov dword [esp], 7
call fcn.00409005
push edx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x30]
and edx, 0xbf
mov dword [esp + 4], edx
mov edx, dword [0x44cdac]
mov dword [esp], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x40927d
mov word [ebx], 0
sub edi, 1
jae 0x4091d8
jmp 0x409258
xor ecx, ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [0x44cdac]
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x4091f5
cmp word [ebx], 0
je 0x4092e6
cmp word [ebp - 0x32], 0x1a
jne 0x4092e6
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x4092e6
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x38], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push edx
push edx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x30], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x409228
jmp 0x409258
cmp dx, 3
jne 0x4092f1
cmp edi, 0x1d
jne 0x4092c6
mov eax, dword [0x44cdac]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408914
jmp 0x4092ff
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xe
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.004089f5
push eax
push eax
cmp edi, 6
ja 0x409301
mov dword [esp], ebx
call fcn.00408ab1
push edi
jmp 0x409301
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00409077
push ecx
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebx + eax*2]
push edx
jmp 0x40932b
lea eax, [ebx + 2]
cmp dx, 4
jne 0x409325
mov dx, word [esi + 2]
add esi, 4
mov word [ebx], dx
jmp 0x40932b
mov word [ebx], dx
add esi, 2
mov ebx, eax
jmp 0x4090c2
cmp dword [ebp - 0x2c], 0
mov word [ebx], 0
je 0x409356
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 0xc], 0x475ee0
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004089f5
lea esp, [ebp - 0xc]
mov eax, 0x475ee0
pop ebx
pop esi
pop edi
pop ebp
ret 8