Function at 0x4072ff
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 0x407328
mov esi, dword [0x40a940]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov esi, 0x43eaa0
mov edi, eax
sub edi, esi
setae bl
cmp edi, 0x1000
setb bh
xor edi, edi
test bl, bh
mov ebx, 0x43eaa0
cmovne ebx, eax
cmove edi, eax
mov dword [esp], edi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x40758f
mov edi, ebx
sub edi, esi
cmp edi, 0x7ff
jg 0x40758f
lea esi, [edx + ecx*2]
mov edx, 0x43eaa0
cmp ax, 3
ja 0x4073ff
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
mov ebp, 0x8000
or edx, ebp
mov dword [esp + 8], edx
mov dword [esp + 4], esi
movzx esi, word [esi + 2]
shr esi, 8
mov dword [esp + 0x14], esi
mov edx, esi
or edx, ebp
mov dword [esp + 0x10], edx
cmp ax, 1
je 0x40741c
movzx eax, ax
cmp eax, 3
je 0x40742a
cmp eax, 2
jne 0x407561
movzx eax, cx
cmp eax, 0x80
jae 0x40744a
cmp cl, 0x24
je 0x4074ae
cmp eax, 0x25
jne 0x4074bf
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407544
cmp ax, 4
jne 0x40740e
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407411
add esi, 2
mov word [ebx], ax
add ebx, 2
jmp 0x407577
not edi
push edi
push ebx
call fcn.004072ff
jmp 0x407561
cmp edi, 0x1d
jne 0x407485
mov eax, dword [0x40a008]
push dword [eax]
push 0x40a760
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407561
mov eax, ecx
and eax, 0x3f
add eax, eax
mov edx, dword [0x40a00c]
add eax, dword [edx + 0x18]
and ecx, 0x40
push ecx
push ebx
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004076a9
cmp word [ebx], 0
jne 0x407544
push esi
push ebx
call fcn.004072ff
jmp 0x407544
mov eax, edi
shl eax, 0xb
lea eax, [eax + section..ndata]
push 0x400
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 0xffffffeb
cmp edi, 6
jbe 0x40755b
jmp 0x407561
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407544
xor eax, eax
mov ecx, dword [0x40a3b4]
cmp dword [ecx + 4], 0
setne al
lea edi, [eax + eax]
add edi, 2
mov ebp, dword [esp + edi*4 + 4]
mov eax, dword [0x40a944]
mov eax, dword [eax]
test eax, eax
je 0x4074fc
mov ecx, ebp
and ecx, 0xffffffbf
push ebx
xor edx, edx
push edx
push edx
push ecx
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407540
mov esi, ebp
and esi, 0x8000
push 7
call fcn.0040679c
and ebp, 0xbf
push esi
push ebp
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407538
mov esi, eax
push ebx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ebp, eax
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x407540
mov word [ebx], 0
dec edi
jne 0x4074d4
mov esi, dword [esp + 0x14]
cmp word [ebx], 0
je 0x40755b
cmp esi, 0x1a
jne 0x40755b
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
call fcn.00406de1
mov esi, dword [esp + 4]
add esi, 4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [ebx + eax*2]
mov edx, 0x43eaa0
movzx eax, word [esi]
test ax, ax
je 0x40758f
mov ecx, ebx
sub ecx, edx
cmp ecx, 0x800
jl 0x407374
mov word [ebx], 0
mov eax, dword [esp]
test eax, eax
je 0x4075ae
push 0x400
push 0x43eaa0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x4075b3
mov eax, 0x43eaa0
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8