Function at 0x405c62
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test ebx, ebx
jge 0x405c83
mov ecx, dword [0x424c5c]
lea eax, [ebx*4 + 4]
sub ecx, eax
mov ebx, dword [ecx]
mov eax, dword [0x4254b8]
mov ecx, dword [ebp + 8]
add ebx, eax
mov eax, 0x424420
sub ecx, eax
mov edi, eax
cmp ecx, 0x800
jae 0x405ca5
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
mov dl, byte [ebx]
test dl, dl
je 0x405e89
mov ecx, edi
sub ecx, eax
cmp ecx, 0x400
jge 0x405e89
inc ebx
cmp dl, 0xfc
mov dword [ebp + 0xc], ebx
jbe 0x405e74
movsx eax, byte [ebx + 1]
movsx ecx, byte [ebx]
mov esi, eax
mov ebx, ecx
and esi, 0x7f
and ebx, 0x7f
shl esi, 7
or esi, ebx
mov ebx, 0x8000
mov dword [ebp - 0x14], eax
or eax, ebx
mov dword [ebp - 0x1c], ecx
push 2
or ecx, ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
pop eax
add ebx, eax
cmp dl, 0xfe
mov dword [ebp - 0x18], ecx
jne 0x405e1e
and dword [ebp - 4], 0
and dword [ebp + 0xc], 0
and byte [edi], 0
push 4
pop esi
cmp dword [ebp - 0x14], esi
jne 0x405d27
mov dword [ebp - 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [ebp + 0xc], eax
jmp 0x405d96
mov eax, dword [ebp - 0x1c]
cmp eax, 0x2b
jne 0x405d46
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405b21
jmp 0x405d96
cmp eax, 0x26
jne 0x405d72
push edi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405b21
cmp byte [edi], 0
jne 0x405dae
push str.C:Program_Files
push edi
call fcn.00405c2e
jmp 0x405d96
cmp eax, 0x25
jne 0x405d85
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405d96
cmp eax, 0x24
jne 0x405d96
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [edi], 0
jne 0x405dae
cmp dword [0x425504], 0
mov dword [ebp + 0xc], esi
jne 0x405dae
mov dword [ebp + 0xc], 2
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
test eax, eax
je 0x405e02
mov eax, dword [ebp + 0xc]
lea esi, [ebp + eax*4 - 0x1c]
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [0x425484]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405df2
push edi
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
call fcn.00405470
cmp dword [ebp - 0xc], 0
jne 0x405e02
jmp 0x405df5
and byte [edi], 0
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
sub esi, 4
test eax, eax
jne 0x405dbf
cmp byte [edi], 0
je 0x405e16
cmp dword [ebp - 4], 0
je 0x405e16
push dword [ebp - 4]
push edi
call fcn.00405c51
push edi
call fcn.00405ea2
jmp 0x405e62
cmp dl, 0xfd
jne 0x405e51
cmp esi, 0x1b
jne 0x405e36
push dword [0x425484]
push edi
call fcn.00405b8b
jmp 0x405e47
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push edi
call fcn.00405c2e
add esi, 0xffffffeb
cmp esi, 6
jae 0x405e62
jmp 0x405e16
cmp dl, 0xff
jne 0x405e62
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00405c62
push edi
call fcn.00405c44
add edi, eax
mov eax, 0x424420
jmp 0x405ca5
jne 0x405e81
mov cl, byte [ebx]
mov byte [edi], cl
inc edi
inc ebx
jmp 0x405ca5
mov byte [edi], dl
inc edi
jmp 0x405ca5
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x405e9e
push eax
push dword [ebp + 8]
call fcn.00405c2e
leave
ret 8