Function at 0x40933a
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 0x409361
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x7aeac0]
mov esi, dword [eax]
add esi, esi
add esi, dword [0x418158]
mov ebx, 0x7bfbc0
cmp dword [ebp - 0x2c], ebx
jb 0x4093ba
mov eax, dword [ebp - 0x2c]
sub eax, ebx
cmp eax, 0x3ffe
ja 0x4093ba
xor edi, edi
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], edi
jmp 0x4093ba
mov dword [esp], ebx
mov eax, edi
sub edi, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00408c58
cmp edi, 6
push eax
push eax
jbe 0x4095b6
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edx
lea edx, [ebx + eax*2]
mov ebx, edx
movzx eax, word [esi]
test eax, eax
je 0x4095fb
mov edx, ebx
sub edx, 0x7bfbc0
cmp edx, 0x1ffe
jg 0x4095fb
cmp eax, 3
ja 0x4095d9
movzx ecx, word [esi + 2]
add esi, 4
movsx edi, byte [esi - 1]
movzx edx, byte [esi - 2]
mov dword [ebp - 0x34], ecx
movzx ecx, byte [ebp - 0x34]
shl edi, 7
and edx, 0x7f
and edi, 0x3f80
or edi, edx
mov byte [ebp - 0x38], cl
mov edx, ecx
mov dword [ebp - 0x24], ecx
or dh, 0x80
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x34]
shr edx, 8
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], edx
or dh, 0x80
cmp eax, 2
mov dword [ebp - 0x20], edx
jne 0x409595
cmp dword [0x40e024], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
cmp byte [ebp - 0x34], 0
jns 0x409496
mov al, byte [ebp - 0x38]
mov dword [esp + 0xc], ebx
and al, 0x40
movzx eax, al
mov dword [esp + 0x10], eax
mov al, byte [ebp - 0x38]
and al, 0x3f
movzx eax, al
add eax, eax
add eax, dword [0x418158]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
mov dword [esp + 8], eax
call fcn.00408ade
sub esp, 0x14
cmp word [ebx], 0
jne 0x4094c6
mov eax, dword [ebp - 0x30]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040933a
jmp 0x4094c4
cmp ecx, 0x25
jne 0x4094ae
mov dword [esp], ebx
mov dword [esp + 4], 0x1000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4094c4
cmp ecx, 0x24
jne 0x40951f
mov dword [esp + 4], 0x1000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ecx
push ecx
xor edi, edi
jmp 0x40951f
mov eax, dword [ebp + edi*4 - 0x28]
mov dword [ebp - 0x34], eax
mov edx, eax
and eax, 0x8000
mov dword [ebp - 0x38], eax
mov eax, dword [0x7aaa84]
and edx, 0xffffffbf
test eax, eax
jne 0x409526
mov dword [esp], 7
call fcn.004092c7
push edx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x34]
and edx, 0xbf
mov dword [esp + 4], edx
mov edx, dword [0x7aaa8c]
mov dword [esp], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x40956a
mov word [ebx], 0
sub edi, 1
jae 0x4094ca
jmp 0x40954a
mov dword [esp + 0x10], ebx
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [0x7aaa8c]
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x4094e7
cmp word [ebx], 0
je 0x4095b6
cmp dword [ebp - 0x30], 0x1a
jne 0x4095b6
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x4095b6
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 - 0x34], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40951a
jmp 0x40954a
cmp eax, 3
jne 0x4095c4
cmp edi, 0x1d
jne 0x409387
mov eax, dword [0x7aaa8c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408b88
jmp 0x4095d2
mov dword [esp], ebx
call fcn.00408d14
push edi
jmp 0x4093ab
mov dword [esp], ebx
not edi
mov dword [esp + 4], edi
call fcn.0040933a
push ecx
push ecx
jmp 0x4093ab
lea edx, [ebx + 2]
cmp eax, 4
jne 0x4095f0
movzx eax, word [esi + 2]
add esi, 4
mov word [ebx], ax
jmp 0x4093b8
mov word [ebx], ax
add esi, 2
jmp 0x4093b8
cmp dword [ebp - 0x2c], 0
mov word [ebx], 0
je 0x40961f
mov dword [ebp + 0xc], 0x7bfbc0
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00408c58
lea esp, [ebp - 0xc]
mov eax, 0x7bfbc0
pop ebx
pop esi
pop edi
pop ebp
ret 8