Function at 0x407b44
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 0x407b6d
mov esi, dword [0x40bb34]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov edi, 0x475770
mov esi, eax
sub esi, edi
setae bl
cmp esi, 0x8000
setb bh
xor esi, esi
test bl, bh
mov ebp, 0x475770
cmovne ebp, eax
cmove esi, eax
mov dword [esp + 4], esi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x407dcf
mov esi, ebp
sub esi, edi
cmp esi, 0x3fff
jg 0x407dcf
lea esi, [edx + ecx*2]
mov ebx, 0x8000
mov edx, 0x475770
cmp ax, 3
ja 0x407c44
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 0x407c82
movzx eax, ax
cmp eax, 3
je 0x407c62
cmp eax, 2
jne 0x407da4
movzx eax, cx
cmp eax, 0x80
jae 0x407cbf
cmp cx, 0x24
je 0x407cfe
cmp eax, 0x25
jne 0x407d0c
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407d7f
cmp ax, 4
jne 0x407c53
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407c56
add esi, 2
mov word [ebp], ax
add ebp, 2
jmp 0x407db7
cmp edi, 0x1d
jne 0x407c90
mov eax, dword [0x40a008]
push dword [eax]
push 0x40b76a
push ebp
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407da4
not edi
push edi
push ebp
call fcn.00407b44
jmp 0x407da4
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 0x407da4
push ebp
call fcn.00407623
jmp 0x407da4
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.00407eeb
cmp word [ebp], 0
jne 0x407d7f
push dword [esp + 0x14]
push ebp
call fcn.00407b44
jmp 0x407d7f
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407d7f
xor eax, eax
mov ecx, dword [0x40b114]
cmp dword [ecx + 4], 0
setne al
lea ebx, [eax*2 + 2]
mov eax, dword [0x40bb38]
mov eax, dword [eax]
test eax, eax
je 0x407d44
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 0x407d7f
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 0x407d76
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 0x407d7f
mov word [ebp], 0
dec ebx
jne 0x407d22
cmp word [ebp], 0
je 0x407d99
cmp dword [esp + 0x14], 0x1a
jne 0x407d99
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
call fcn.00407623
mov ebx, 0x8000
add esi, 4
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [ebp + eax*2]
mov edx, 0x475770
movzx eax, word [esi]
test ax, ax
je 0x407dcf
mov ecx, ebp
sub ecx, edx
cmp ecx, 0x4000
jl 0x407bbf
mov word [ebp], 0
mov ecx, dword [esp + 4]
test ecx, ecx
mov eax, 0x475770
je 0x407df3
push 0x2000
push 0x475770
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8