Function at 0x409a58
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x60d8
call fcn.0040d260
sub rsp, rax
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov rax, qword [0x00413830]
mov qword [rsp + 0x60c0], rax
mov r13, r9
mov r12, r8
mov r15, rdx
mov r14, rcx
mov rdx, qword [rsp + 0x6140]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor ebp, ebp
cmp eax, ebp
jne 0x409d51
mov rbx, rbp
mov qword [rsp + 0x80], rbp
mov rsi, rbp
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], rbp
mov eax, 0x2000
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x44], eax
mov edi, ebp
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x20c0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x44]
lea r8, [rsp + 0xc0]
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x409c0c
mov r8, r13
mov rdx, r12
lea rcx, [rsp + 0xc0]
call fcn.0040810c
cmp al, bpl
je 0x409baa
xor eax, eax
mov byte [rsp + 0x40], al
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const____ptr64__class_std::allocator_char__const____ptr64____ptr64]
nop
mov r9, rax
mov r8d, 1
mov rdx, rsi
lea rcx, [rsp + 0x78]
call fcn.00409410
nop
lea rcx, [rsp + 0xa0]
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
mov rsi, qword [rsp + 0x88]
inc edi
mov eax, 0x2000
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x20c0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x44]
lea r8, [rsp + 0xc0]
mov edx, edi
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x409b43
mov rbx, qword [rsp + 0x80]
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call fcn.004099e8
cmp rbx, rbp
jne 0x409c24
mov rax, rbp
jmp 0x409c2e
mov rax, rsi
sub rax, rbx
sar rax, 5
dec eax
movsxd rdi, eax
cmp eax, ebp
jl 0x409d23
mov rax, rdi
shl rax, 5
lea rbp, [rax + rbx + 8]
mov rdx, qword [rbp]
test rdx, rdx
cmove rdx, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409cee
mov dword [rsp + 0x58], 0x2000
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40c0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
xor r8d, r8d
lea rdx, str.JavaHome
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409ce3
lea rdx, [rsp + 0x40c0]
mov rcx, r14
call fcn.00407a88
test al, al
je 0x409ce3
mov byte [rsp + 0x20], 0
mov r9, r13
mov r8, r12
mov rdx, r15
mov rcx, r14
call fcn.00408980
test al, al
jne 0x409cfd
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub rbp, 0x20
dec rdi
jns 0x409c47
jmp 0x409d23
mov rdi, rbx
cmp rbx, rsi
je 0x409d17
mov rcx, rdi
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
add rdi, 0x20
cmp rdi, rsi
jne 0x409d05
mov rcx, rbx
call fcn.0040cec0
mov al, 1
jmp 0x409d53
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdi, rbx
cmp rbx, rsi
je 0x409d49
mov rcx, rdi
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
add rdi, 0x20
cmp rdi, rsi
jne 0x409d37
mov rcx, rbx
call fcn.0040cec0
xor al, al
mov rcx, qword [rsp + 0x60c0]
call fcn.0040d230
add rsp, 0x60d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret