Function at 0x40632e
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 0x40634f
mov ecx, dword [0x44eadc]
lea eax, [ebx*4 + 4]
sub ecx, eax
mov ebx, dword [ecx]
mov eax, dword [0x452b38]
mov ecx, dword [ebp + 8]
add ebx, eax
mov eax, 0x442a80
sub ecx, eax
mov edi, eax
cmp ecx, 0x4000
jae 0x406371
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
mov dl, byte [ebx]
test dl, dl
je 0x406555
mov ecx, edi
sub ecx, eax
cmp ecx, 0x2000
jge 0x406555
inc ebx
cmp dl, 0xfc
mov dword [ebp + 0xc], ebx
jbe 0x406540
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 0x4064ea
and dword [ebp - 4], 0
and dword [ebp + 0xc], 0
and byte [edi], 0
push 4
pop esi
cmp dword [ebp - 0x14], esi
jne 0x4063f3
mov dword [ebp - 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [ebp + 0xc], eax
jmp 0x406462
mov eax, dword [ebp - 0x1c]
cmp eax, 0x2b
jne 0x406412
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004061ed
jmp 0x406462
cmp eax, 0x26
jne 0x40643e
push edi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004061ed
cmp byte [edi], 0
jne 0x40647a
push str.C:Program_Files
push edi
call fcn.004062fa
jmp 0x406462
cmp eax, 0x25
jne 0x406451
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x406462
cmp eax, 0x24
jne 0x406462
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [edi], 0
jne 0x40647a
cmp dword [0x452b84], 0
mov dword [ebp + 0xc], esi
jne 0x40647a
mov dword [ebp + 0xc], 2
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
test eax, eax
je 0x4064ce
mov eax, dword [ebp + 0xc]
lea esi, [ebp + eax*4 - 0x1c]
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [0x452b04]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4064be
push edi
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
call fcn.00405ae7
cmp dword [ebp - 0xc], 0
jne 0x4064ce
jmp 0x4064c1
and byte [edi], 0
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
sub esi, 4
test eax, eax
jne 0x40648b
cmp byte [edi], 0
je 0x4064e2
cmp dword [ebp - 4], 0
je 0x4064e2
push dword [ebp - 4]
push edi
call fcn.0040631d
push edi
call fcn.0040656e
jmp 0x40652e
cmp dl, 0xfd
jne 0x40651d
cmp esi, 0x1b
jne 0x406502
push dword [0x452b04]
push edi
call fcn.00406257
jmp 0x406513
mov eax, esi
shl eax, 0xd
add eax, section..ndata
push eax
push edi
call fcn.004062fa
add esi, 0xffffffeb
cmp esi, 6
jae 0x40652e
jmp 0x4064e2
cmp dl, 0xff
jne 0x40652e
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.0040632e
push edi
call fcn.00406310
add edi, eax
mov eax, 0x442a80
jmp 0x406371
jne 0x40654d
mov cl, byte [ebx]
mov byte [edi], cl
inc edi
inc ebx
jmp 0x406371
mov byte [edi], dl
inc edi
jmp 0x406371
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x40656a
push eax
push dword [ebp + 8]
call fcn.004062fa
leave
ret 8