Function at 0x407620
Capabilities:
Get common file path

Disassembly:
sub esp, 0x18
push ebp
mov ebp, dword [esp + 0x24]
test ebp, ebp
push esi
jge 0x40763e
mov ecx, dword [0x4253a0]
lea eax, [ebp*4 + 4]
sub ecx, eax
mov ebp, dword [ecx]
mov eax, dword [esp + 0x24]
mov edx, dword [0x425bf8]
mov esi, 0x424b80
mov ecx, eax
sub ecx, esi
add ebp, edx
cmp ecx, 0x800
jae 0x407665
mov esi, eax
mov dword [esp + 0x24], 0
mov dl, byte [ebp]
test dl, dl
je 0x4078aa
push ebx
push edi
mov eax, esi
sub eax, 0x424b80
cmp eax, 0x400
jge 0x4078a8
add ebp, 1
cmp dl, 0xfc
jbe 0x407889
movsx eax, byte [ebp + 1]
movsx ecx, byte [ebp]
mov edi, eax
and edi, 0x7f
mov ebx, ecx
and ebx, 0x7f
shl edi, 7
or edi, ebx
mov ebx, ecx
or ecx, 0x8000
mov dword [esp + 0x20], eax
or eax, 0x8000
add ebp, 2
cmp dl, 0xfe
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebp
jne 0x40781b
mov ebp, 2
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x407701
cmp ax, 0x5a04
je 0x407701
mov edi, dword [esp + 0x20]
cmp edi, 0x23
je 0x407701
cmp edi, 0x2e
je 0x407701
mov dword [esp + 0x30], 0
jmp 0x40770d
mov edi, dword [esp + 0x20]
mov dword [esp + 0x30], 1
cmp dword [0x425c84], 0
je 0x40771b
mov ebp, 4
test bl, bl
jns 0x40777b
mov eax, ebx
and ebx, 0x3f
add ebx, dword [0x425bf8]
and eax, 0x40
push ebx
push 0x80000002
mov edx, str.SoftwareMicrosoftWindowsCurrentVersion
call fcn.00407500
cmp byte [esi], 0
jne 0x407752
push edi
push esi
call fcn.00407620
cmp byte [esi], 0
je 0x407763
mov edi, dword [esp + 0x20]
cmp edi, 0x1a
jne 0x407763
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call fcn.004078e0
mov ebp, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
jmp 0x40789d
cmp ebx, 0x25
jne 0x40778e
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x407749
cmp ebx, 0x24
jne 0x4077a1
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x407749
test ebp, ebp
je 0x407749
mov eax, dword [0x425bc0]
sub ebp, 1
test eax, eax
je 0x4077d3
cmp dword [esp + 0x30], 0
je 0x4077d3
mov ecx, dword [esp + ebp*4 + 0x18]
mov edx, dword [0x425bc4]
push esi
push 0
push 0
push ecx
push edx
call eax
test eax, eax
je 0x407749
mov ecx, dword [esp + ebp*4 + 0x18]
mov edx, dword [0x425bc4]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40780f
mov eax, dword [esp + 0x10]
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov ecx, dword [esp + 0x10]
push ecx
mov edi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x407749
test ebp, ebp
mov byte [esi], 0
jne 0x4077a5
jmp 0x407763
cmp dl, 0xfd
jne 0x40786d
cmp edi, 0x1d
jne 0x40783d
mov edx, dword [0x425bc4]
push edx
push 0x4095f8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x407854
mov eax, edi
shl eax, 0xa
push 0x400
add eax, section..ndata
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
add edi, 0xffffffeb
cmp edi, 7
jae 0x40787e
push esi
call fcn.004078e0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
jmp 0x40789d
cmp dl, 0xff
jne 0x40787e
or ecx, 0xffffffff
sub ecx, edi
push ecx
push esi
call fcn.00407620
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
jmp 0x40789d
jne 0x407898
mov dl, byte [ebp]
mov byte [esi], dl
add esi, 1
add ebp, 1
jmp 0x40789d
mov byte [esi], dl
add esi, 1
mov dl, byte [ebp]
test dl, dl
jne 0x407672
pop edi
pop ebx
mov eax, dword [esp + 0x24]
test eax, eax
mov byte [esi], 0
pop esi
pop ebp
je 0x4078ce
push 0x400
push 0x424b80
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
add esp, 0x18
ret 8
mov eax, 0x424b80
add esp, 0x18
ret 8