Function at 0x410690
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 [0x440014]
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 0x41086f
mov edi, eax
lea ebx, [eax + eax]
xor eax, eax
dec eax
test edi, edi
cmovs ebx, eax
push ebx
call fcn.004120db
add esp, 4
mov esi, eax
push ebx
push 0
push eax
call fcn.00414cd0
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 0x410866
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 0x41077f
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.0041221b
add esp, 4
test eax, eax
je 0x410774
cmp word [ebx + eax*2 - 2], 0x5c
mov dword [ebp - 0x20], edi
jne 0x410786
push eax
push ebx
push edi
call fcn.0041dee8
add esp, 0xc
test eax, eax
je 0x4107f2
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 str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x4107fd
xor eax, eax
jmp 0x41085c
test ebx, ebx
je 0x41077f
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
jmp 0x410866
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.004120db
add esp, 4
mov edi, eax
push esi
push 0
push eax
call fcn.00414cd0
sub esp, 4
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410930
add esp, 0x10
push dword [ebp - 0x1c]
push edi
push dword [ebp - 0x20]
call fcn.0041dee8
add esp, 0xc
mov esi, eax
push edi
mov edi, dword [ebp - 0x20]
call fcn.00412343
add esp, 4
test esi, esi
jne 0x410737
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov bl, 1
jmp 0x410866
mov edi, dword [ebp - 0x18]
xor eax, eax
cmp edi, 4
jb 0x41085c
mov esi, edi
and esi, 0xfffffffe
push esi
call fcn.004120db
add esp, 4
push esi
xor ecx, ecx
push ecx
push eax
mov esi, eax
call fcn.00414cd0
add esp, 0xc
push ebx
mov dword [ebp - 0x1c], esi
push esi
xor ebx, ebx
xor eax, eax
push eax
push 0x10002
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x410883
push dword [ebp - 0x1c]
call fcn.00412343
add esp, 4
mov eax, ebx
test esi, esi
setne bl
and bl, al
mov edi, dword [ebp - 0x20]
push edi
call fcn.00412343
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412e03
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.00420aca
add esp, 8
test eax, eax
je 0x4108ba
mov ecx, dword [ebp - 0x1c]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x4108be
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.0041dee8
add esp, 0xc
test eax, eax
jne 0x410920
mov bl, 1
xor esi, esi
inc esi
jmp 0x41084f
xor ebx, ebx
jmp 0x41084f
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.004120db
add esp, 4
push ebx
mov esi, dword [ebp - 0x1c]
push 0
mov ebx, eax
push eax
call fcn.00414cd0
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00410930
add esp, 0x10
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x20]
call fcn.0041dee8
add esp, 0xc
mov esi, eax
push ebx
call fcn.00412343
add esp, 4
test esi, esi
je 0x4108b3
mov bl, 1
xor esi, esi
jmp 0x41084f