Function at 0x4068b1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x4068cf
mov ecx, dword [0x42e3fc]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42ec58]
push ebx
push esi
push edi
lea edi, [eax + ecx]
mov eax, dword [ebp + 8]
mov ecx, 0x42dbc0
sub eax, ecx
mov esi, ecx
cmp eax, 0x800
jae 0x4068f5
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
mov al, byte [edi]
test al, al
mov byte [ebp + 0xf], al
je 0x406ace
mov ebx, dword [ebp + 8]
mov edx, esi
sub edx, ecx
cmp edx, 0x400
jge 0x406ace
inc edi
cmp al, 0xfc
jbe 0x40694c
movsx eax, byte [edi + 1]
movsx ecx, byte [edi]
mov ebx, eax
mov edx, ecx
and ebx, 0x7f
and edx, 0x7f
shl ebx, 7
or ebx, edx
mov edx, 0x8000
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], ecx
or eax, edx
or ecx, edx
mov dword [ebp - 0x10], eax
mov al, byte [ebp + 0xf]
inc edi
mov dword [ebp - 0x18], ecx
inc edi
cmp al, 0xfc
jne 0x406959
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
jmp 0x406abc
cmp al, 0xfe
jne 0x406a75
and dword [ebp - 4], 0
and dword [ebp + 0xc], 0
and byte [esi], 0
cmp dword [ebp - 0x14], 4
jne 0x406980
mov dword [ebp - 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [ebp + 0xc], 2
cmp dword [ebp - 0x1c], 0x2b
jne 0x40699b
push esi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406799
cmp dword [ebp - 0x1c], 0x26
jne 0x4069ca
push esi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406799
cmp byte [esi], 0
jne 0x406a4a
push str.C:Program_Files
push esi
call sub.KERNEL32.dll_lstrcpyA
cmp dword [ebp - 0x1c], 0x25
jne 0x4069dc
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [ebp - 0x1c], 0x24
jne 0x4069ee
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [esi], 0
jne 0x406a4a
cmp dword [0x42ec84], 0
mov dword [ebp + 0xc], 4
jne 0x406a0c
mov dword [ebp + 0xc], 2
jmp 0x406a4a
dec dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
push dword [ebp + eax*4 - 0x1c]
push dword [0x42ec24]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406a47
push esi
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
call fcn.00406248
cmp dword [ebp - 0xc], 0
jne 0x406a50
jmp 0x406a4a
and byte [esi], 0
cmp dword [ebp + 0xc], 0
jne 0x406a0c
cmp byte [esi], 0
je 0x406a65
cmp dword [ebp - 4], 0
je 0x406a65
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call fcn.00406af1
push esi
call sub.KERNEL32.dll_lstrlenA
add esi, eax
jmp 0x406abc
cmp al, 0xfd
jne 0x406aa7
cmp ebx, 0x1b
jne 0x406a8c
push dword [0x42ec24]
push esi
call fcn.00406803
jmp 0x406a9d
mov eax, ebx
shl eax, 0xa
add eax, section..ndata
push eax
push esi
call sub.KERNEL32.dll_lstrcpyA
lea eax, [ebx - 0x15]
cmp eax, 6
jae 0x406a6b
jmp 0x406a65
cmp al, 0xff
jne 0x406ab9
or eax, 0xffffffff
sub eax, ebx
push eax
push esi
call fcn.004068b1
jmp 0x406a6b
mov byte [esi], al
inc esi
mov al, byte [edi]
mov ecx, 0x42dbc0
test al, al
mov byte [ebp + 0xf], al
jne 0x406905
and byte [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x406aeb
push 0x400
push ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x406aed
mov eax, ecx
leave
ret 8