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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [0x431014]
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 0x4089af
mov edi, eax
lea ebx, [eax + eax]
xor eax, eax
dec eax
test edi, edi
cmovs ebx, eax
push ebx
call fcn.0040a27b
add esp, 4
mov esi, eax
push ebx
push 0
push eax
call fcn.0040c7e0
add esp, 0xc
push edi
mov edi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
xor ebx, ebx
test eax, eax
je 0x4089a6
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 0x4088bf
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.0040a3bb
add esp, 4
test eax, eax
je 0x4088b4
cmp word [ebx + eax*2 - 2], 0x5c
mov dword [ebp - 0x20], edi
jne 0x4088c6
push eax
push ebx
push edi
call fcn.0041223c
add esp, 0xc
test eax, eax
je 0x408932
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
lea ebx, [ebp - 0x18]
mov dword [ebx], eax
push ebx
push eax
push eax
push 0x10002
push 0x42c104
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x40893d
xor eax, eax
jmp 0x40899c
test ebx, ebx
je 0x4088bf
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
jmp 0x4089a6
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], ecx
mov ecx, eax
add ecx, 2
mov dword [ebp - 0x24], ecx
lea esi, [eax + eax + 4]
mov eax, 0xffffffff
cmovs esi, eax
push esi
call fcn.0040a27b
add esp, 4
mov edi, eax
push esi
push 0
push eax
call fcn.0040c7e0
sub esp, 4
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00408a70
add esp, 0x10
push dword [ebp - 0x1c]
push edi
push dword [ebp - 0x20]
call fcn.0041223c
add esp, 0xc
mov esi, eax
push edi
mov edi, dword [ebp - 0x20]
call fcn.0040a507
add esp, 4
test esi, esi
jne 0x408877
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov bl, 1
jmp 0x4089a6
mov edi, dword [ebp - 0x18]
xor eax, eax
cmp edi, 4
jb 0x40899c
mov esi, edi
and esi, 0xfffffffe
push esi
call fcn.0040a27b
add esp, 4
push esi
xor ecx, ecx
push ecx
push eax
mov esi, eax
call fcn.0040c7e0
add esp, 0xc
push ebx
mov dword [ebp - 0x1c], esi
push esi
xor ebx, ebx
xor eax, eax
push eax
push 0x10002
push 0x42c104
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x4089c3
push dword [ebp - 0x1c]
call fcn.0040a507
add esp, 4
mov eax, ebx
test esi, esi
setne bl
and bl, al
mov edi, dword [ebp - 0x20]
push edi
call fcn.0040a507
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, ebx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
shr edi, 1
push edi
push dword [ebp - 0x1c]
call fcn.00413f27
add esp, 8
test eax, eax
je 0x4089fa
mov ecx, dword [ebp - 0x1c]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x4089fe
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.0041223c
add esp, 0xc
test eax, eax
jne 0x408a60
mov bl, 1
xor esi, esi
inc esi
jmp 0x40898f
xor ebx, ebx
jmp 0x40898f
lea ecx, [eax + 1]
mov dword [ebp - 0x24], ecx
mov edi, eax
add edi, 2
lea eax, [eax + eax + 4]
mov ebx, 0xffffffff
cmovns ebx, eax
push ebx
call fcn.0040a27b
add esp, 4
push ebx
mov esi, dword [ebp - 0x1c]
push 0
mov ebx, eax
push eax
call fcn.0040c7e0
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00408a70
add esp, 0x10
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x20]
call fcn.0041223c
add esp, 0xc
mov esi, eax
push ebx
call fcn.0040a507
add esp, 4
test esi, esi
je 0x4089f3
mov bl, 1
xor esi, esi
jmp 0x40898f