Function at 0x4079d0
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov edx, dword [0x40a00c]
mov edx, dword [edx + 0x18]
test ecx, ecx
jns 0x4079f9
mov esi, dword [0x40ba74]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov edi, 0x475758
mov esi, eax
sub esi, edi
setae bl
cmp esi, 0x8000
setb bh
xor esi, esi
test bl, bh
mov ebp, 0x475758
cmovne ebp, eax
cmove esi, eax
mov dword [esp + 4], esi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x407c5b
mov esi, ebp
sub esi, edi
cmp esi, 0x3fff
jg 0x407c5b
lea esi, [edx + ecx*2]
mov ebx, 0x8000
mov edx, 0x475758
cmp ax, 3
ja 0x407ad0
movzx edx, byte [esi + 3]
and edx, 0x7f
shl edx, 7
movzx ecx, byte [esi + 2]
mov edi, ecx
and edi, 0x7f
or edi, edx
mov dword [esp + 0xc], ecx
mov edx, ecx
or edx, ebx
mov dword [esp + 8], edx
movzx edx, word [esi + 2]
shr edx, 8
mov dword [esp + 0x14], edx
or edx, ebx
mov dword [esp + 0x10], edx
cmp ax, 1
je 0x407b0e
movzx eax, ax
cmp eax, 3
je 0x407aee
cmp eax, 2
jne 0x407c30
movzx eax, cx
cmp eax, 0x80
jae 0x407b4b
cmp cx, 0x24
je 0x407b8a
cmp eax, 0x25
jne 0x407b98
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407c0b
cmp ax, 4
jne 0x407adf
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407ae2
add esi, 2
mov word [ebp], ax
add ebp, 2
jmp 0x407c43
cmp edi, 0x1d
jne 0x407b1c
mov eax, dword [0x40a008]
push dword [eax]
push 0x40b6aa
push ebp
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407c30
not edi
push edi
push ebp
call fcn.004079d0
jmp 0x407c30
mov eax, edi
shl eax, 0xe
lea eax, [eax + section..ndata]
push 0x2000
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 0xffffffeb
cmp edi, 6
ja 0x407c30
push ebp
call fcn.004074af
jmp 0x407c30
mov eax, ecx
and eax, 0x3f
add eax, eax
mov edx, dword [0x40a00c]
add eax, dword [edx + 0x18]
and ecx, 0x40
push ecx
push ebp
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00407d77
cmp word [ebp], 0
jne 0x407c0b
push dword [esp + 0x14]
push ebp
call fcn.004079d0
jmp 0x407c0b
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407c0b
xor eax, eax
mov ecx, dword [0x40b054]
cmp dword [ecx + 4], 0
setne al
lea ebx, [eax*2 + 2]
mov eax, dword [0x40ba78]
mov eax, dword [eax]
test eax, eax
je 0x407bd0
push ebp
xor ecx, ecx
push ecx
push ecx
push dword [esp + ebx*4 + 0x10]
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407c0b
mov eax, esp
push eax
push dword [esp + ebx*4 + 8]
mov eax, dword [0x40a008]
push dword [eax]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x407c02
push ebp
push dword [esp + 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov edi, eax
push dword [esp]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x407c0b
mov word [ebp], 0
dec ebx
jne 0x407bae
cmp word [ebp], 0
je 0x407c25
cmp dword [esp + 0x14], 0x1a
jne 0x407c25
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
call fcn.004074af
mov ebx, 0x8000
add esi, 4
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [ebp + eax*2]
mov edx, 0x475758
movzx eax, word [esi]
test ax, ax
je 0x407c5b
mov ecx, ebp
sub ecx, edx
cmp ecx, 0x4000
jl 0x407a4b
mov word [ebp], 0
mov ecx, dword [esp + 4]
test ecx, ecx
mov eax, 0x475758
je 0x407c7f
push 0x2000
push 0x475758
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8