Function at 0x406356
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 0x406377
mov ecx, dword [0x4597dc]
lea eax, [ebx*4 + 4]
sub ecx, eax
mov ebx, dword [ecx]
mov eax, dword [0x45d838]
mov ecx, dword [ebp + 8]
add ebx, eax
mov eax, 0x44d780
sub ecx, eax
mov edi, eax
cmp ecx, 0x4000
jae 0x406399
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
mov dl, byte [ebx]
test dl, dl
je 0x40657d
mov ecx, edi
sub ecx, eax
cmp ecx, 0x2000
jge 0x40657d
inc ebx
cmp dl, 0xfc
mov dword [ebp + 0xc], ebx
jbe 0x406568
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 0x406512
and dword [ebp - 4], 0
and dword [ebp + 0xc], 0
and byte [edi], 0
push 4
pop esi
cmp dword [ebp - 0x14], esi
jne 0x40641b
mov dword [ebp - 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [ebp + 0xc], eax
jmp 0x40648a
mov eax, dword [ebp - 0x1c]
cmp eax, 0x2b
jne 0x40643a
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406215
jmp 0x40648a
cmp eax, 0x26
jne 0x406466
push edi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406215
cmp byte [edi], 0
jne 0x4064a2
push str.C:Program_Files
push edi
call fcn.00406322
jmp 0x40648a
cmp eax, 0x25
jne 0x406479
push 0x2000
push edi
call dword [0x4080e4]
jmp 0x40648a
cmp eax, 0x24
jne 0x40648a
push 0x2000
push edi
call dword [0x4080b0]
cmp byte [edi], 0
jne 0x4064a2
cmp dword [0x45d884], 0
mov dword [ebp + 0xc], esi
jne 0x4064a2
mov dword [ebp + 0xc], 2
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
test eax, eax
je 0x4064f6
mov eax, dword [ebp + 0xc]
lea esi, [ebp + eax*4 - 0x1c]
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [0x45d804]
call dword [0x40816c]
test eax, eax
jne 0x4064e6
push edi
push dword [ebp - 8]
call dword [0x408158]
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
call fcn.00405b0f
cmp dword [ebp - 0xc], 0
jne 0x4064f6
jmp 0x4064e9
and byte [edi], 0
mov eax, dword [ebp + 0xc]
dec dword [ebp + 0xc]
sub esi, 4
test eax, eax
jne 0x4064b3
cmp byte [edi], 0
je 0x40650a
cmp dword [ebp - 4], 0
je 0x40650a
push dword [ebp - 4]
push edi
call fcn.00406345
push edi
call fcn.00406596
jmp 0x406556
cmp dl, 0xfd
jne 0x406545
cmp esi, 0x1b
jne 0x40652a
push dword [0x45d804]
push edi
call fcn.0040627f
jmp 0x40653b
mov eax, esi
shl eax, 0xd
add eax, section..ndata
push eax
push edi
call fcn.00406322
add esi, 0xffffffeb
cmp esi, 6
jae 0x406556
jmp 0x40650a
cmp dl, 0xff
jne 0x406556
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00406356
push edi
call fcn.00406338
add edi, eax
mov eax, 0x44d780
jmp 0x406399
jne 0x406575
mov cl, byte [ebx]
mov byte [edi], cl
inc edi
inc ebx
jmp 0x406399
mov byte [edi], dl
inc edi
jmp 0x406399
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x406592
push eax
push dword [ebp + 8]
call fcn.00406322
leave
ret 8