Function at 0x404e40
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 0x404e61
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 0x404ebc
mov eax, dword [ebp + 8]
sub eax, esi
cmp eax, 0x3fff
ja 0x404ebc
mov esi, dword [ebp + 8]
mov dword [ebp + 8], 0
jmp 0x404ebc
mov dword [esp], esi
mov eax, ebx
sub ebx, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.0040a0ec
cmp ebx, 6
push eax
push eax
jbe 0x4050dd
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 0x405129
mov eax, esi
sub eax, 0x454340
cmp eax, 0x1ffe
jg 0x405129
cmp edx, 3
ja 0x405107
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 0x4050bc
mov dword [ebp - 0x48], 1
mov edx, dword [0x44eae0]
test edx, edx
jns 0x404f59
cmp dx, 0x5a04
je 0x404f59
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 0x404fc2
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.00409ebc
sub esp, 0x14
cmp word [esi], 0
jne 0x404ff6
mov dword [esp], esi
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call fcn.00404e40
push eax
push eax
jmp 0x404ff6
cmp byte [ebp - 0x3d], 0x25
jne 0x404fdb
mov dword [esp], esi
mov dword [esp + 4], 0x1000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x404ff2
cmp dword [ebp - 0x44], 0x24
jne 0x404ff6
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 0x405069
mov eax, dword [0x44eae4]
mov ecx, dword [ebp + ebx*4 - 0x28]
test eax, eax
je 0x405017
cmp byte [ebp - 0x3d], 0
jne 0x405039
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 0x4050b2
jmp 0x405089
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 0x405017
cmp word [esi], 0
je 0x4050dd
cmp dword [ebp - 0x3c], 0x1a
jne 0x4050dd
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], esi
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x4050dd
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 0x405069
mov word [esi], 0
jmp 0x404ffe
cmp edx, 3
jne 0x4050eb
cmp ebx, 0x1d
jne 0x404e89
mov dword [esp], esi
mov eax, dword [0x44eae8]
mov dword [esp + 4], eax
call fcn.0040948c
jmp 0x405100
mov dword [esp], esi
call fcn.0040ab7c
push eax
jmp 0x404ead
dec edx
jne 0x404ead
mov dword [esp], esi
not ebx
mov dword [esp + 4], ebx
call fcn.00404e40
push ebx
push ebx
jmp 0x404ead
lea eax, [esi + 2]
cmp edx, 4
jne 0x40511e
movzx edx, word [edi + 2]
add edi, 4
mov word [esi], dx
jmp 0x404eba
mov word [esi], dx
add edi, 2
jmp 0x404eba
cmp dword [ebp + 8], 0
mov eax, 0x454340
mov word [esi], 0
je 0x40514a
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a0ec
push edx
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8