Function at 0x407c50
Capabilities:
Get common file path

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x18
test ecx, ecx
jns 0x407c6c
lea eax, [ecx*4 + 4]
mov ecx, dword [0x437500]
sub ecx, eax
mov ecx, dword [ecx]
mov eax, dword [0x439578]
mov edx, dword [esp + 0x1c]
push ebx
push esi
mov esi, 0x4354c0
lea ebx, [eax + ecx*2]
cmp edx, esi
jb 0x407c9a
mov eax, edx
sub eax, esi
sar eax, 1
cmp eax, 0x1000
jae 0x407c9a
mov esi, edx
mov dword [esp + 0x24], 0
movzx ecx, word [ebx]
test cx, cx
je 0x407eec
push ebp
push edi
jmp 0x407cb0
mov eax, esi
sub eax, 0x4354c0
and eax, 0xfffffffe
cmp eax, 0x1000
jge 0x407eea
movzx edx, cx
add ebx, 2
cmp edx, 4
jae 0x407ec8
movsx edi, byte [ebx + 1]
movsx eax, byte [ebx]
and edi, 0x7f
movzx ebp, byte [ebx + 1]
and eax, 0x7f
shl edi, 7
or edi, eax
mov dword [esp + 0x24], ebp
movzx eax, byte [ebx]
add ebx, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
or eax, 0x8000
mov dword [esp + 0x18], eax
mov eax, ebp
or eax, 0x8000
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
cmp edx, 2
jne 0x407e59
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x407d41
mov ecx, 0x5a04
cmp ax, cx
je 0x407d41
cmp ebp, 0x23
je 0x407d41
cmp ebp, 0x2e
je 0x407d41
xor ebp, ebp
jmp 0x407d46
mov ebp, 1
cmp dword [0x439604], 0
mov eax, 4
mov ecx, dword [esp + 0x10]
cmovne ebx, eax
test cl, cl
jns 0x407d92
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x439578]
push esi
lea eax, [eax + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00408990
cmp word [esi], 0
mov edi, dword [esp + 0x24]
jne 0x407dad
push edi
push esi
call fcn.00407c50
jmp 0x407da7
cmp ecx, 0x25
jne 0x407dd7
push 0x800
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, dword [esp + 0x24]
cmp word [esi], 0
je 0x407dbe
cmp edi, 0x1a
jne 0x407dbe
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call fcn.00408db0
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ede
cmp ecx, 0x24
jne 0x407dea
push 0x800
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407da3
test ebx, ebx
je 0x407da3
mov edi, edi
mov eax, dword [0x437510]
dec ebx
test eax, eax
je 0x407e13
test ebp, ebp
je 0x407e13
push esi
push 0
push 0
push dword [esp + ebx*4 + 0x24]
push dword [0x437518]
call eax
test eax, eax
je 0x407da3
lea eax, [esp + 0x30]
push eax
push dword [esp + ebx*4 + 0x1c]
push dword [0x437518]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x407e4b
push esi
push dword [esp + 0x34]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x30]
mov edi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x407da3
xor eax, eax
mov word [esi], ax
test ebx, ebx
jne 0x407df0
jmp 0x407dbe
cmp edx, 3
jne 0x407eab
cmp edi, 0x1d
jne 0x407e7a
push dword [0x437518]
push 0x40cb28
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407e91
mov eax, edi
shl eax, 0xc
push 0x800
add eax, section..ndata
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [edi - 0x15]
cmp eax, 7
jae 0x407ebc
push esi
call fcn.00408db0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ede
cmp edx, 1
jne 0x407ebc
or eax, 0xffffffff
sub eax, edi
push eax
push esi
call fcn.00407c50
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ede
jne 0x407ed8
mov ax, word [ebx]
mov word [esi], ax
add esi, 2
add ebx, 2
jmp 0x407ede
mov word [esi], dx
add esi, 2
movzx ecx, word [ebx]
test cx, cx
jne 0x407cb0
pop edi
pop ebp
xor eax, eax
mov word [esi], ax
mov eax, dword [esp + 0x24]
pop esi
pop ebx
test eax, eax
je 0x407f12
push 0x800
push 0x4354c0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esp, 0x18
ret 8
mov eax, 0x4354c0
add esp, 0x18
ret 8