Function at 0x140021c00
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0x98
mov qword [rbp + 0x1f], 0xfffffffffffffffe
mov rsi, rcx
xor ebx, ebx
mov dword [rbp + 0x67], ebx
mov qword [rbp - 0x31], rbx
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rcx + 0x40]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140021c8c
mov dword [rbp + 0x77], 4
lea rax, [rbp + 0x77]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x67]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 1]
xor r8d, r8d
lea rdx, str.DeviceState
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [rbp + 0x67]
mov dword [rsi + 0x70], eax
lea r8, [0x140085918]
lea rdx, [rsi + 0x40]
lea rcx, [rbp + 7]
call fcn.140021f60
mov dword [rbp + 0x6f], ebx
mov qword [rbp - 0x29], rbx
lea rdx, [rbp - 0x29]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rax]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x140021d0f
mov dword [rbp + 0x7f], 4
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 3]
xor r8d, r8d
lea rdx, str.1da5d803_d492_4edd_8c23_e0c0ffee7f0e_5
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rbp + 7]
add rdx, 0xffffffffffffffe8
or edi, 0xffffffff
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140021d2f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, ebx
cmp dword [rbp + 0x6f], ebx
sete al
mov dword [rsi + 0x6c], eax
mov dword [rsi + 0x78], ebx
mov edx, dword [rsi + 0x68]
lea rcx, [rbp - 0x39]
call fcn.140021700
nop
mov rax, qword [rbp - 0x39]
cmp dword [rax - 0x10], 0
je 0x140021e53
mov qword [rbp - 0x21], rbx
mov qword [rbp - 0x19], rbx
mov qword [rbp - 0x11], rbx
mov dword [rbp - 9], ebx
lea r8, [0x140085918]
lea rdx, [rsi + 0x40]
lea rcx, [rbp + 0xf]
call fcn.140021f60
mov r8, qword [rbp - 0x39]
mov rdx, qword [rax]
call fcn.14002d380
mov r15d, eax
mov rdx, qword [rbp + 0xf]
add rdx, 0xffffffffffffffe8
mov ecx, edi
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x140021da8
mov rcx, qword [rdx]
mov r9, qword [rcx]
call qword [r9 + 8]
test r15d, r15d
je 0x140021dfe
lea r8, [0x140085918]
lea rdx, [rsi + 0x40]
lea rcx, [rbp + 0x17]
call fcn.140021f60
nop
lea r9, [rbp - 0x21]
mov r8, qword [rbp - 0x39]
mov rdx, qword [rax]
call fcn.14002d1f0
nop
mov rdx, qword [rbp + 0x17]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140021df0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rcx, [rbp - 0x21]
call fcn.140011700
mov dword [rsi + 0x78], eax
jmp 0x140021e05
mov dword [rsi + 0x78], 0xfffffffe
mov rsi, qword [rbp - 0x21]
test rsi, rsi
je 0x140021e5a
mov r14, qword [rbp - 0x19]
test r14, r14
je 0x140021e49
nop word [rax + rax]
mov rdx, qword [rsi + rbx*8]
sub rdx, 0x18
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140021e3d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
inc rbx
cmp rbx, r14
jb 0x140021e20
mov rsi, qword [rbp - 0x21]
mov rcx, rsi
call fcn.14005d6dc
jmp 0x140021e5a
mov dword [rsi + 0x78], 0xfffffffe
mov rdx, qword [rbp - 0x39]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140021e75
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret