Function at 0x404ea8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 0xc]
lea edi, [eax + eax]
test eax, eax
jns 0x404ec9
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x452b24]
mov edi, dword [eax]
add edi, edi
add edi, dword [0x44ea98]
mov esi, 0x454340
cmp dword [ebp + 8], esi
jb 0x404f24
mov eax, dword [ebp + 8]
sub eax, esi
cmp eax, 0x3fff
ja 0x404f24
mov esi, dword [ebp + 8]
mov dword [ebp + 8], 0
jmp 0x404f24
mov dword [esp], esi
mov eax, ebx
sub ebx, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.0040a178
cmp ebx, 6
push eax
push eax
jbe 0x405145
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esi + eax*2]
push ecx
mov esi, eax
movzx edx, word [edi]
test edx, edx
je 0x405191
mov eax, esi
sub eax, 0x454340
cmp eax, 0x1ffe
jg 0x405191
cmp edx, 3
ja 0x40516f
movsx ebx, byte [edi + 3]
add edi, 4
movzx eax, byte [edi - 2]
shl ebx, 7
and eax, 0x7f
and ebx, 0x3f80
or ebx, eax
movzx eax, word [edi - 2]
mov byte [ebp - 0x3d], al
movzx ecx, al
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x24], ecx
or ch, 0x80
mov dword [ebp - 0x28], ecx
mov ecx, eax
shr ecx, 8
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x1c], ecx
or ch, 0x80
cmp edx, 2
mov dword [ebp - 0x20], ecx
jne 0x405124
mov dword [ebp - 0x48], 1
mov edx, dword [0x44eae0]
test edx, edx
jns 0x404fc1
cmp dx, 0x5a04
je 0x404fc1
cmp dword [ebp - 0x3c], 0x23
sete bl
cmp dword [ebp - 0x3c], 0x2e
sete dl
or bl, dl
movzx edx, bl
mov dword [ebp - 0x48], edx
cmp dword [0x44ea24], 1
sbb ebx, ebx
and ebx, 0xfffffffe
add ebx, 4
test al, al
jns 0x40502a
mov dword [esp + 0xc], esi
mov al, byte [ebp - 0x3d]
xor ebx, ebx
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
and al, 0x40
movzx eax, al
mov dword [esp + 0x10], eax
mov al, byte [ebp - 0x3d]
and al, 0x3f
movzx eax, al
add eax, eax
add eax, dword [0x44ea98]
mov dword [esp + 8], eax
call fcn.00409f48
sub esp, 0x14
cmp word [esi], 0
jne 0x40505e
mov dword [esp], esi
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call fcn.00404ea8
push eax
push eax
jmp 0x40505e
cmp byte [ebp - 0x3d], 0x25
jne 0x405043
mov dword [esp], esi
mov dword [esp + 4], 0x1000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40505a
cmp dword [ebp - 0x44], 0x24
jne 0x40505e
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ebx
push ebx
xor ebx, ebx
mov al, byte [ebp - 0x48]
and al, 1
mov byte [ebp - 0x3d], al
dec ebx
cmp ebx, 0xffffffff
je 0x4050d1
mov eax, dword [0x44eae4]
mov ecx, dword [ebp + ebx*4 - 0x28]
test eax, eax
je 0x40507f
cmp byte [ebp - 0x3d], 0
jne 0x4050a1
mov dword [esp + 4], ecx
lea eax, [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [0x44eae8]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
jne 0x40511a
jmp 0x4050f1
mov dword [esp + 4], ecx
mov edx, dword [0x44eae8]
mov dword [ebp - 0x44], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], edx
call eax
mov ecx, dword [ebp - 0x44]
sub esp, 0x14
test eax, eax
jne 0x40507f
cmp word [esi], 0
je 0x405145
cmp dword [ebp - 0x3c], 0x1a
jne 0x405145
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], esi
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x405145
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ecx, dword [ebp - 0x2c]
push edx
push edx
mov dword [esp], ecx
mov dword [ebp - 0x44], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x44]
test eax, eax
push ecx
jne 0x4050d1
mov word [esi], 0
jmp 0x405066
cmp edx, 3
jne 0x405153
cmp ebx, 0x1d
jne 0x404ef1
mov dword [esp], esi
mov eax, dword [0x44eae8]
mov dword [esp + 4], eax
call fcn.00409518
jmp 0x405168
mov dword [esp], esi
call fcn.0040ac08
push eax
jmp 0x404f15
dec edx
jne 0x404f15
mov dword [esp], esi
not ebx
mov dword [esp + 4], ebx
call fcn.00404ea8
push ebx
push ebx
jmp 0x404f15
lea eax, [esi + 2]
cmp edx, 4
jne 0x405186
movzx edx, word [edi + 2]
add edi, 4
mov word [esi], dx
jmp 0x404f22
mov word [esi], dx
add edi, 2
jmp 0x404f22
cmp dword [ebp + 8], 0
mov eax, 0x454340
mov word [esi], 0
je 0x4051b2
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a178
push edx
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8