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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov dword [ebp - 0x50], edx
mov ebx, dword [ebp + 0xc]
mov esi, ecx
mov ecx, 0x428020
mov eax, dword [0x43300c]
xor eax, ebp
test ebx, ebx
mov dword [ebp - 0x10], eax
mov eax, 0x428010
cmove ecx, eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x8000
push ecx
call sub.SHELL32.dll_SHGetKnownFolderPath
mov edi, eax
mov eax, dword [ebp - 0x24]
test edi, edi
jns 0x4078d3
test eax, eax
je 0x4078bf
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e0d1
mov eax, edi
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x4c], esi
cmp ebx, 1
mov esi, ebx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x28], 0
jne 0x407909
mov edx, dword [ebp + 8]
mov eax, ecx
or eax, edx
je 0x407909
test ecx, ecx
cmovne edx, ecx
lea ecx, [ebp - 0x2c]
call fcn.00407c60
jmp 0x40792e
movsd xmm0, qword [0x42b3f8]
movsd xmm1, qword [0x42b3f0]
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x20]
movsd qword [ebp - 0x18], xmm0
movsd qword [ebp - 0x20], xmm1
call fcn.00407d10
mov edi, eax
test eax, eax
jns 0x40795b
mov eax, dword [ebp - 0x28]
test eax, eax
mov dword [ebp - 0x28], 0
je 0x40794b
push eax
call fcn.0040d9b7
add esp, 4
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x4078b8
jmp 0x4078bf
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
push edi
call fcn.00416af2
add esp, 4
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
lea ebx, [eax + ecx + 1]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x58], edx
push edx
push edi
push 0x42db74
push ebx
push eax
call fcn.00407e00
add esp, 0x14
cmp dword [ebp - 0x34], ebx
mov edi, 0x80004005
jne 0x407a63
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
test ecx, ecx
jne 0x407a82
test esi, esi
jne 0x4079ee
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x3c], 0
je 0x4079d5
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0x3c]
push eax
push 1
jmp 0x4079dd
lea ecx, [ebp - 0x34]
mov edx, ecx
push eax
push 0
call fcn.00407ef0
add esp, 8
mov ecx, dword [ebp - 0x4c]
mov edi, eax
test eax, eax
js 0x407a4c
mov eax, dword [ebp + 0x14]
test ecx, ecx
je 0x407a17
cmp dword [ebp - 0x3c], 0
je 0x407a33
mov ecx, dword [eax]
mov edx, dword [ebp - 0x38]
test ecx, ecx
mov dword [ebp - 0x38], ecx
mov dword [eax], edx
je 0x407a3a
push ecx
call fcn.00416af2
add esp, 4
mov dword [ebp - 0x3c], eax
jmp 0x407a4a
mov ecx, dword [eax]
mov edx, dword [ebp - 0x30]
test ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [eax], edx
je 0x407a43
push ecx
call fcn.00416af2
add esp, 4
mov dword [ebp - 0x34], eax
jmp 0x407a4a
mov edi, 0x80004005
jmp 0x407a4c
mov dword [ebp - 0x3c], 0
jmp 0x407a4a
mov dword [ebp - 0x34], 0
xor edi, edi
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], 0
test eax, eax
je 0x407a63
push eax
call fcn.0040d9b7
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x30], 0
test eax, eax
je 0x407a7a
push eax
call fcn.0040d9b7
add esp, 4
mov eax, dword [ebp - 0x58]
jmp 0x407937
mov ecx, dword [ebp - 0x50]
mov eax, 0x42bccf
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
test ecx, ecx
cmovne eax, ecx
sub esp, 0x10
lea ecx, [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x42b663
mov dword [esp], ecx
call fcn.00407e70
add esp, 0x10
cmp dword [ebp - 0x48], 0
je 0x407bbb
mov esi, dword [ebp - 0x44]
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 2
push dword [ebp - 0x4c]
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x407b3b
mov eax, dword [ebp - 0x20]
mov ebx, 0xffffffff
add eax, eax
cmovae ebx, eax
push ebx
call fcn.0040d9ae
add esp, 4
mov edi, eax
push ebx
push 0
push eax
call fcn.0040fff0
add esp, 0xc
lea eax, [ebp - 0x20]
mov dword [ebp - 0x40], edi
push eax
push edi
push 0
push 2
push dword [ebp - 0x4c]
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
mov ebx, edi
mov dword [ebp - 0x50], edi
jne 0x407b42
jmp 0x407bd9
mov dword [ebp - 0x50], 0
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 2
push dword [ebp - 0x4c]
push esi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x407bb8
mov eax, dword [ebp - 0x20]
mov edi, 0xffffffff
add eax, eax
cmovae edi, eax
push edi
call fcn.0040d9ae
add esp, 4
mov ebx, eax
push edi
push 0
push eax
call fcn.0040fff0
add esp, 0xc
cmp dword [ebp - 0x50], 0
mov dword [ebp - 0x40], ebx
je 0x407b97
push dword [ebp - 0x50]
call fcn.0040d9b7
add esp, 4
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push 2
push dword [ebp - 0x4c]
push esi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov esi, dword [ebp + 0xc]
test eax, eax
jne 0x407bbb
jmp 0x407bd9
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4c]
xor eax, eax
cmp esi, 1
lea edx, [ebp - 0x40]
sete al
push eax
call fcn.00407710
add esp, 4
test eax, eax
js 0x407c1d
mov ebx, dword [ebp - 0x40]
movsd xmm0, qword [0x42b408]
movsd xmm1, qword [str.updates]
movsd qword [ebp - 0x18], xmm0
movsd qword [ebp - 0x20], xmm1
push ebx
call fcn.00416af2
add esp, 4
mov ecx, dword [ebp - 0x54]
lea edx, [ebp - 0x3c]
lea eax, [ecx + eax + 9]
lea ecx, [ebp - 0x20]
push ebx
push ecx
push dword [ebp - 0x30]
push str._s_s_s
push eax
push edx
call fcn.00407e00
add esp, 0x18
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], 0
test eax, eax
je 0x407c34
push eax
call fcn.0040d9b7
add esp, 4
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], 0
test eax, eax
je 0x407c4b
push eax
call fcn.0040d9b7
add esp, 4
mov ecx, dword [ebp - 0x4c]
mov esi, dword [ebp + 0xc]
test esi, esi
jne 0x4079ee
jmp 0x4079c1