Function at 0x4085a0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [0x434040]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor ebx, ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x408731
lea ebx, [eax + eax]
xor ecx, ecx
dec ecx
test eax, eax
cmovs ebx, ecx
push ebx
mov esi, eax
call fcn.0040a313
add esp, 4
mov edi, eax
push ebx
push 0
push eax
call fcn.0040cc70
add esp, 0xc
push esi
mov esi, edi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
xor ebx, ebx
test eax, eax
je 0x408728
lea eax, [ebp - 0x14]
mov dword [eax], ebx
push eax
push ebx
push ebx
push section..rdata
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
js 0x408726
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00415f29
add esp, 4
test eax, eax
je 0x40871b
cmp word [ebx + eax*2 - 2], 0x5c
jne 0x408745
push eax
push ebx
push esi
call fcn.00414058
add esp, 0xc
test eax, eax
je 0x4087b6
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
lea edi, [ebp - 0x18]
mov dword [edi], ebx
push edi
push ebx
push ebx
push 0x10002
push 0x42ee80
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x408728
mov eax, dword [ebp - 0x18]
xor ebx, ebx
cmp eax, 4
jb 0x408728
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], eax
mov esi, eax
and esi, 0xfffffffe
push esi
call fcn.0040a313
add esp, 4
mov dword [ebp - 0x20], eax
push esi
mov esi, dword [ebp - 0x24]
push ebx
push eax
call fcn.0040cc70
add esp, 0xc
push edi
mov edi, dword [ebp - 0x20]
push edi
push ebx
push 0x10002
push 0x42ee80
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x408834
mov eax, dword [ebp - 0x1c]
shr eax, 1
push eax
push edi
call fcn.00416051
add esp, 8
test eax, eax
je 0x408832
cmp word [edi + eax*2 - 2], 0x5c
jne 0x4087c4
push eax
push edi
push esi
call fcn.00414058
add esp, 0xc
test eax, eax
jne 0x408832
mov bl, 1
jmp 0x408834
test ebx, ebx
je 0x408726
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
push esi
call fcn.0040a31c
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040abc5
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [eax + 1]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], esi
lea esi, [eax*2 + 4]
add eax, 2
mov dword [ebp - 0x1c], eax
mov ecx, 0xffffffff
cmovs esi, ecx
push esi
call fcn.0040a313
add esp, 4
mov edi, eax
push esi
mov esi, dword [ebp - 0x24]
push 0
push eax
call fcn.0040cc70
sub esp, 4
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00401da0
add esp, 0x10
push dword [ebp - 0x20]
push edi
push esi
call fcn.00414058
add esp, 0xc
mov dword [ebp - 0x20], eax
push edi
call fcn.0040a31c
add esp, 4
cmp dword [ebp - 0x20], 0
jne 0x408650
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov bl, 1
jmp 0x408728
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], ecx
lea ecx, [eax*2 + 4]
add eax, 2
mov dword [ebp - 0x28], eax
mov esi, 0xffffffff
cmovns esi, ecx
push esi
call fcn.0040a313
add esp, 4
mov ebx, eax
push esi
push 0
push eax
call fcn.0040cc70
sub esp, 4
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x24]
mov dword [esp], ebx
call fcn.00401da0
add esp, 0x10
push dword [ebp - 0x1c]
push ebx
push esi
call fcn.00414058
add esp, 0xc
mov dword [ebp - 0x1c], eax
push ebx
call fcn.0040a31c
add esp, 4
cmp dword [ebp - 0x1c], 0
je 0x408714
xor ebx, ebx
push edi
call fcn.0040a31c
add esp, 4
jmp 0x408728