Function at 0x1402702f0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push r13
lea rbp, [rsp - 0x47]
sub rsp, 0x90
xor r13d, r13d
lea rdx, str.RegistryMachineSYSTEMCurrentControlSetControl
lea rcx, [rbp - 0x19]
mov dword [rbp + 0x67], r13d
mov dword [rbp + 0x6f], r13d
call sub.ntdll.dll_RtlInitUnicodeString
lea rax, [rbp - 0x19]
mov dword [rbp - 9], gethostbyname
xorps xmm0, xmm0
mov qword [rbp + 7], rax
lea r8, [rbp - 9]
mov qword [rbp - 1], r13
lea edx, [r13 + 1]
mov dword [rbp + 0xf], 0x40
lea rcx, [rbp + 0x77]
movdqu xmmword [rbp + 0x17], xmm0
call sub.ntdll.dll_NtOpenKey
mov ebx, eax
test eax, eax
je 0x1402703a7
mov rdx, qword gs:[0x30]
lea r8, [0x1403ffeb8]
lea ecx, [r13 + 1]
mov dword [rdx + 0x11e8], eax
lea rdx, [0x1403ffed8]
mov r9, qword [rbp - 0x11]
call fcn.14026d8f0
mov r8, qword [rbp - 0x11]
lea rdx, [0x1403ffef8]
mov r9d, ebx
lea rcx, str._s:_cannot_open__ls:__x_n_n
call fcn.140274950
xor eax, eax
add rsp, 0x90
pop r13
pop rbx
pop rbp
ret
lea rdx, str.SystemStartOptions
mov qword [rsp + 0x78], r14
lea rcx, [rbp - 0x19]
call sub.ntdll.dll_RtlInitUnicodeString
mov rcx, qword [rbp + 0x77]
lea rax, [rbp + 0x67]
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x19]
mov r14d, 2
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8d, r14d
call sub.ntdll.dll_NtQueryValueKey
mov ebx, eax
cmp eax, 0xc0000023
je 0x14027043b
mov rcx, qword gs:[0x30]
lea r8, [0x1403fff60]
lea rdx, str.ERROR:__s:_cannot_query_SystemStartOptions_value_size
mov dword [rcx + 0x11e8], eax
lea ecx, [r14 - 1]
call fcn.14026d8f0
mov r8d, ebx
lea rdx, [0x1403fffb8]
lea rcx, str._s:_cannot_query_SystemStartOptions_value_size:__x_n_n
call fcn.140274950
mov r14, qword [rsp + 0x78]
xor eax, eax
add rsp, 0x90
pop r13
pop rbx
pop rbp
ret
mov eax, dword [rbp + 0x67]
xor edx, edx
add eax, r14d
mov ecx, eax
mov dword [rbp + 0x67], eax
call fcn.14026fe10
mov rbx, rax
test rax, rax
jne 0x140270498
mov r9d, dword [rbp + 0x67]
lea r8, [0x140400010]
lea rdx, [0x140400030]
xor ecx, ecx
call fcn.14026d8f0
mov r8d, dword [rbp + 0x67]
lea rdx, [0x140400060]
lea rcx, [0x140400080]
call fcn.140274950
mov r14, qword [rsp + 0x78]
xor eax, eax
add rsp, 0x90
pop r13
pop rbx
pop rbp
ret
mov r8d, dword [rbp + 0x67]
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x88], rdi
call fcn.14027b2c0
mov eax, dword [rbp + 0x67]
lea rcx, [rbp + 0x6f]
mov qword [rsp + 0x28], rcx
lea rdx, [rbp - 0x19]
mov rcx, qword [rbp + 0x77]
mov r9, rbx
mov r8d, r14d
mov qword [rsp + 0x20], rax
call sub.ntdll.dll_NtQueryValueKey
mov edi, eax
test eax, eax
je 0x140270524
mov rcx, qword gs:[0x30]
lea r8, [0x1404000b0]
lea rdx, str.ERROR:__s:_cannot_query_SystemStartOptions_value
mov dword [rcx + 0x11e8], eax
mov ecx, 1
call fcn.14026d8f0
mov r8d, edi
lea rdx, [0x140400108]
lea rcx, str._s:_cannot_query_SystemStartOptions_value:__x_n_n
call fcn.140274950
mov rcx, rbx
call fcn.14026fe90
xor eax, eax
jmp 0x1402705f5
mov edi, dword [rbx + 8]
shr edi, 1
mov qword [rsp + 0xc8], rsi
mov qword [rsp + 0x80], r12
mov qword [rsp + 0x70], r15
je 0x14027054d
lea eax, [rdi - 1]
mov word [rbx + rax*2 + 0xc], r13w
lea r14d, [rdi + rdi]
movsxd r12, r14d
xor edx, edx
mov rcx, r12
call fcn.14026fe10
mov rsi, rax
test rax, rax
jne 0x14027059c
mov r9d, r14d
lea r8, [0x140400158]
lea rdx, [0x140400178]
xor ecx, ecx
call fcn.14026d8f0
mov r8d, r14d
lea rdx, [0x1404001a8]
lea rcx, str._s:_cannot_allocate__u_bytes_of_memory_n_n
call fcn.140274950
mov rcx, rbx
call fcn.14026fe90
xor eax, eax
jmp 0x1402705e0
test edi, edi
je 0x1402705d1
mov r8, r12
lea rdx, [rbx + 0xc]
mov rcx, rsi
call fcn.140278ed0
mov eax, dword [rbp + 0x67]
lea r9, [rbx + 0xc]
lea r8, str.winx_get_windows_boot_options
mov dword [rsp + 0x20], eax
lea rdx, str.INFO:___s:__ls____u
xor ecx, ecx
call fcn.14026d8f0
jmp 0x1402705d5
mov word [rax], r13w
mov rcx, rbx
call fcn.14026fe90
mov rax, rsi
mov rsi, qword [rsp + 0xc8]
mov r12, qword [rsp + 0x80]
mov r15, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x88]
mov r14, qword [rsp + 0x78]
add rsp, 0x90
pop r13
pop rbx
pop rbp
ret