Function at 0x407d70
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
test eax, eax
jns 0x407d8c
mov ecx, dword [0x437500]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov edx, dword [esp + 0x1c]
push ebx
push ebp
mov ebp, dword [0x439598]
lea ebx, [eax*2]
push esi
mov esi, 0x4354c0
add ebx, ebp
cmp edx, esi
jb 0x407dc2
mov eax, edx
sub eax, esi
sar eax, 1
cmp eax, 0x1000
jae 0x407dc2
mov esi, edx
mov dword [esp + 0x28], 0
movzx ecx, word [ebx]
test cx, cx
je 0x40800e
push edi
nop
mov eax, esi
sub eax, 0x4354c0
and eax, 0xfffffffe
cmp eax, 0x1000
jge 0x40800d
movzx edx, cx
add ebx, 2
cmp edx, 4
jae 0x407fe4
movsx edi, byte [ebx + 1]
movsx eax, byte [ebx]
and edi, 0x7f
movzx ecx, byte [ebx]
and eax, 0x7f
shl edi, 7
or edi, eax
mov dword [esp + 0x1c], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x18], eax
movzx eax, byte [ebx + 1]
add ebx, 2
mov dword [esp + 0x24], eax
or eax, 0x8000
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebx
cmp edx, 2
jne 0x407f75
mov eax, dword [0x439520]
mov ebx, edx
mov edi, dword [esp + 0x24]
test eax, eax
jns 0x407e60
mov edx, 0x5a04
cmp ax, dx
je 0x407e60
cmp edi, 0x23
je 0x407e60
cmp edi, 0x2e
je 0x407e60
xor edx, edx
jmp 0x407e65
mov edx, 1
cmp dword [0x439624], 0
mov eax, 4
mov dword [esp + 0x10], edx
cmovne ebx, eax
test cl, cl
jns 0x407ede
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push esi
lea eax, [ecx*2]
add eax, ebp
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00408b90
cmp word [esi], 0
jne 0x407eb2
push edi
push esi
call fcn.00407d70
cmp word [esi], 0
je 0x407ec5
cmp dword [esp + 0x24], 0x1a
jne 0x407ec5
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call fcn.00408fe0
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ffa
cmp ecx, 0x25
jne 0x407ef1
push 0x800
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407eac
cmp ecx, 0x24
jne 0x407f04
push 0x800
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407eac
test ebx, ebx
je 0x407eac
mov eax, dword [0x437510]
dec ebx
test eax, eax
je 0x407f2b
test edx, edx
je 0x407f2b
push esi
push 0
push 0
push dword [esp + ebx*4 + 0x24]
push dword [0x437518]
call eax
test eax, eax
je 0x407eac
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 0x407f63
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 0x407eac
mov edx, dword [esp + 0x10]
xor eax, eax
mov word [esi], ax
test ebx, ebx
jne 0x407f08
jmp 0x407ec5
cmp edx, 3
jne 0x407fc7
cmp edi, 0x1d
jne 0x407f96
push dword [0x437518]
push 0x40cb68
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407fad
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 0x407fd8
push esi
call fcn.00408fe0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ffa
cmp edx, 1
jne 0x407fd8
or eax, 0xffffffff
sub eax, edi
push eax
push esi
call fcn.00407d70
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
jmp 0x407ffa
jne 0x407ff4
mov ax, word [ebx]
mov word [esi], ax
add esi, 2
add ebx, 2
jmp 0x407ffa
mov word [esi], dx
add esi, 2
movzx ecx, word [ebx]
test cx, cx
je 0x40800d
mov ebp, dword [0x439598]
jmp 0x407dd0
pop edi
xor eax, eax
mov word [esi], ax
mov eax, dword [esp + 0x28]
pop esi
pop ebp
pop ebx
test eax, eax
je 0x408035
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