Function at 0x404790
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0x288
mov rax, qword [0x0040f310]
mov qword [rsp + 0x270], rax
mov qword [r11 + 0x20], rsi
mov qword [r11 - 8], rdi
lea rax, [rsp + 0x38]
mov edi, edx
mov rsi, rcx
lea rdx, [0x0040d930]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404800
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.Error_opening_registry_key_SoftwareJavaSoftJava_Runtime_Environment_n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
xor al, al
jmp 0x404ab0
lea rax, [rsp + 0x30]
mov qword [rsp + 0x2a0], rbx
mov rbx, qword [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x34]
lea rdx, str.CurrentVersion
mov rcx, rbx
xor r8d, r8d
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40487b
cmp dword [rsp + 0x34], 1
jne 0x40487b
cmp dword [rsp + 0x30], 0x104
jae 0x40487b
lea rax, [rsp + 0x30]
lea rdx, str.CurrentVersion
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4048a5
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.Failed_reading_value_of_registry_key:_n_tSoftwareJavaSoftJava_Runtime_EnvironmentCurrentVersion_n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
jmp 0x404aa8
lea rax, [rsp + 0x50]
lea r8, [0x0040da24]
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x4048c7
inc rax
test ecx, ecx
jne 0x4048b4
test edx, edx
je 0x4048fa
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea r8, [rsp + 0x50]
lea rdx, str.Registry_key_SoftwareJavaSoftJava_Runtime_EnvironmentCurrentVersion_nhas_value__s__but_1.5_is_required._n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
jmp 0x404aa8
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40493a
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea r8, [rsp + 0x50]
lea rdx, str.Error_opening_registry_key_SoftwareJavaSoftJava_Runtime_Environment_s_n
add rcx, 0x60
jmp 0x4048e2
mov rbx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rdx, [0x0040db00]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4049a4
cmp dword [rsp + 0x34], 1
jne 0x4049a4
cmp dword [rsp + 0x30], edi
jae 0x4049a4
lea rax, [rsp + 0x30]
lea rdx, [0x0040db00]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4049de
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea r8, [rsp + 0x50]
lea rdx, str.Failed_reading_value_of_registry_key:_n_tSoftwareJavaSoftJava_Runtime_Environment_sJavaHome_n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
jmp 0x404aa8
cmp byte [0x0040f352], 0
je 0x404a90
mov rbx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rdx, str.MicroVersion
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a61
cmp dword [rsp + 0x34], 1
jne 0x404a61
cmp dword [rsp + 0x30], 0x104
jae 0x404a61
lea rax, [rsp + 0x30]
lea rdx, str.MicroVersion
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x160]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x404a76
lea rcx, str.Warning:_Cant_read_MicroVersion_n
call qword [sym.imp.msvcrt.dll_printf]
mov byte [rsp + 0x160], 0
lea r8, [rsp + 0x160]
lea rdx, [rsp + 0x50]
lea rcx, str.Version_major.minor.micro___s._s_n
call qword [sym.imp.msvcrt.dll_printf]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
mov rbx, qword [rsp + 0x2a0]
mov rdi, qword [rsp + 0x280]
mov rsi, qword [rsp + 0x2a8]
mov rcx, qword [rsp + 0x270]
call fcn.00409d10
add rsp, 0x288
ret