Function at 0x40b7f0
Capabilities:
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45459f
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x47f060]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x430], esi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
xor cl, cl
call fcn.00409d10
test al, al
je 0x40b98e
lea eax, [ebp - 0x424]
push eax
push 0x20019
push 0
push str.SOFTWAREiSafe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x42c], 0x104
mov dword [ebp - 0x424], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b8e3
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x428]
push eax
push 0
push 0x45d188
push dword [ebp - 0x424]
mov dword [ebp - 0x428], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b8e3
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
lea eax, [ebp - 0x218]
push eax
push ecx
mov edx, 0x104
mov ecx, esi
call fcn.00406e00
jmp 0x40ba54
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push reloc.OLEAUT32.dll_SysReAllocString
call esi
lea eax, [ebp - 0x424]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstalliSafe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x428], 0x104
mov dword [ebp - 0x424], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b982
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0
push 0x45d188
push dword [ebp - 0x424]
mov dword [ebp - 0x42c], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b982
push dword [ebp - 0x424]
call esi
push ecx
lea eax, [ebp - 0x218]
push eax
push ecx
mov ecx, dword [ebp - 0x430]
mov edx, 0x104
call fcn.00406e00
jmp 0x40ba54
push reloc.OLEAUT32.dll_SysReAllocString
call esi
jmp 0x40ba54
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push str._siSafe_
push eax
call fcn.00405ac0
mov eax, dword [0x48277c]
add esp, 0xc
test eax, eax
jne 0x40ba19
push 0xe4
call dword [sym.imp.MSVCR110.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [ebp - 0x430], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x40ba0b
mov ecx, eax
call fcn.004122b0
jmp 0x40ba0d
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x48277c], eax
cmp word [ebp - 0x420], 0
lea edx, [eax + 0x90]
jne 0x40ba2d
xor ecx, ecx
jmp 0x40ba45
lea ecx, [ebp - 0x420]
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ba36
sub ecx, esi
sar ecx, 1
push ecx
lea eax, [ebp - 0x420]
push eax
mov ecx, edx
call fcn.00406c00
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00452076
mov esp, ebp
pop ebp
ret