Function at 0x407fce
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, dword [ebp + 0xc]
test esi, esi
jns 0x407fea
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x4379e4]
mov esi, dword [esi]
add esi, dword [0x437158]
mov ebx, 0x437a00
cmp dword [ebp + 8], ebx
jb 0x408044
mov eax, dword [ebp + 8]
sub eax, ebx
cmp eax, 0x7ff
ja 0x408044
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], 0
jmp 0x408044
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00407e8c
push eax
push eax
cmp edi, 6
jbe 0x408254
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ecx
add eax, ebx
mov ebx, eax
mov dl, byte [esi]
test dl, dl
je 0x40829c
mov eax, ebx
sub eax, 0x437a00
cmp eax, 0x3ff
jg 0x40829c
cmp dl, 3
ja 0x40827f
movsx eax, byte [esi + 2]
movsx ecx, byte [esi + 1]
add esi, 3
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x3c]
mov eax, ecx
mov dword [ebp - 0x40], ecx
and ecx, 0x7f
shl edi, 7
and edi, 0x3f80
or edi, ecx
movsx ecx, al
or ch, 0x80
mov dword [ebp - 0x28], ecx
movsx ecx, al
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x3c]
or ch, 0x80
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], ecx
cmp dl, 2
jne 0x408233
mov edx, dword [0x4371a0]
mov dword [ebp - 0x44], 1
test edx, edx
jns 0x4080e0
cmp dx, 0x5a04
je 0x4080e0
cmp ecx, 0x23
sete dl
cmp ecx, 0x2e
sete cl
or edx, ecx
movzx ecx, dl
mov dword [ebp - 0x44], ecx
cmp dword [0x4370e4], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test al, al
jns 0x408141
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and edx, 0x40
add eax, dword [0x437158]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
movsx edx, dl
mov dword [esp + 8], eax
mov dword [esp + 0x10], edx
mov dword [esp], 0x80000002
call fcn.00407d07
sub esp, 0x14
cmp byte [ebx], 0
jne 0x4081a7
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407fce
push eax
push eax
jmp 0x4081a7
cmp dword [ebp - 0x40], 0x25
jne 0x40815a
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x408171
cmp dword [ebp - 0x40], 0x24
jne 0x4081a7
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x4081a7
mov eax, dword [0x4371a4]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x4081af
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x4371a8]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x408204
mov byte [ebx], 0
dec edi
cmp edi, 0xffffffff
jne 0x408177
jmp 0x4081e5
cmp dword [ebp - 0x44], 0
je 0x408184
mov ecx, dword [0x4371a8]
mov dword [esp + 4], edx
mov dword [ebp - 0x40], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x40]
sub esp, 0x14
test eax, eax
jne 0x408184
cmp byte [ebx], 0
je 0x408254
cmp dword [ebp - 0x3c], 0x1a
jne 0x408254
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x408254
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push edx
push edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x40]
push ecx
test eax, eax
je 0x4081a4
jmp 0x4081e5
cmp dl, 3
jne 0x408262
cmp edi, 0x1d
jne 0x408012
mov eax, dword [0x4371a8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407daf
jmp 0x408278
mov dword [esp], ebx
call fcn.00407f05
push eax
jmp 0x408036
dec dl
jne 0x408036
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00407fce
push edi
push edi
jmp 0x408036
lea eax, [ebx + 1]
cmp dl, 4
jne 0x408294
mov dl, byte [esi + 1]
add esi, 2
mov byte [ebx], dl
jmp 0x408042
mov byte [ebx], dl
inc esi
jmp 0x408042
cmp dword [ebp + 8], 0
mov byte [ebx], 0
mov eax, 0x437a00
je 0x4082bb
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00407e8c
push edx
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8