Function at 0x4079d8
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 0x407a01
mov esi, dword [0x40ba74]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov edi, 0x7f3f98
mov esi, eax
sub esi, edi
setae bl
cmp esi, 0x8000
setb bh
xor esi, esi
test bl, bh
mov ebp, 0x7f3f98
cmovne ebp, eax
cmove esi, eax
mov dword [esp + 4], esi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x407c63
mov esi, ebp
sub esi, edi
cmp esi, 0x3fff
jg 0x407c63
lea esi, [edx + ecx*2]
mov ebx, 0x8000
mov edx, 0x7f3f98
cmp ax, 3
ja 0x407ad8
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 0x407b16
movzx eax, ax
cmp eax, 3
je 0x407af6
cmp eax, 2
jne 0x407c38
movzx eax, cx
cmp eax, 0x80
jae 0x407b53
cmp cx, 0x24
je 0x407b92
cmp eax, 0x25
jne 0x407ba0
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407c13
cmp ax, 4
jne 0x407ae7
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407aea
add esi, 2
mov word [ebp], ax
add ebp, 2
jmp 0x407c4b
cmp edi, 0x1d
jne 0x407b24
mov eax, dword [0x40a008]
push dword [eax]
push 0x40b6aa
push ebp
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407c38
not edi
push edi
push ebp
call fcn.004079d8
jmp 0x407c38
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 0x407c38
push ebp
call fcn.004074b7
jmp 0x407c38
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.00407d7f
cmp word [ebp], 0
jne 0x407c13
push dword [esp + 0x14]
push ebp
call fcn.004079d8
jmp 0x407c13
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407c13
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 0x407bd8
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 0x407c13
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 0x407c0a
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 0x407c13
mov word [ebp], 0
dec ebx
jne 0x407bb6
cmp word [ebp], 0
je 0x407c2d
cmp dword [esp + 0x14], 0x1a
jne 0x407c2d
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
call fcn.004074b7
mov ebx, 0x8000
add esi, 4
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [ebp + eax*2]
mov edx, 0x7f3f98
movzx eax, word [esi]
test ax, ax
je 0x407c63
mov ecx, ebp
sub ecx, edx
cmp ecx, 0x4000
jl 0x407a53
mov word [ebp], 0
mov ecx, dword [esp + 4]
test ecx, ecx
mov eax, 0x7f3f98
je 0x407c87
push 0x2000
push 0x7f3f98
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8