Function at 0x140002950
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2480]
mov eax, 0x2580
call fcn.14000a630
sub rsp, rax
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x25c8], rbx
mov rax, qword [0x140038088]
xor rax, rsp
mov qword [rbp + 0x2470], rax
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov dword [rsp + 0x50], 0x114
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov rcx, rsi
call fcn.1400049b0
xor edx, edx
mov rcx, qword [rsi]
call fcn.140005a60
cmp dword [rsp + 0x60], 1
jne 0x140002bd5
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x70]
call fcn.14000d0c0
xor r15d, r15d
mov qword [rsp + 0x20], r15
mov r9d, 0x400
lea r8, [rbp + 0x70]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
setne al
test al, al
je 0x140002cd8
lea rdx, [rbp + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140004850
nop
or rdi, 0xffffffffffffffff
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x140002a68
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140002a30
cmp word [rax], r15w
jne 0x140002a5d
mov rax, qword [rbx + 8]
test rax, rax
je 0x140002a68
cmp byte [rax], 0
je 0x140002a68
cmp qword [rbx + 0x10], 0
jne 0x140002a55
mov rcx, qword [rbx + 0x18]
add rcx, rcx
call fcn.14000ea5c
mov qword [rbx + 0x10], rax
mov rcx, rbx
call fcn.140005af0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140002aaf
jmp 0x140002a6f
lea rcx, [0x140032658]
mov rax, rcx
mov rdx, r15
cmp word [rcx], dx
je 0x140002a8d
nop word [rax + rax]
lea rax, [rax + 2]
inc rdx
cmp word [rax], 0
jne 0x140002a80
lea rax, [rcx + rdx*2]
cmp rax, rcx
jb 0x140002aaf
cmp word [rax], 0x5c
je 0x140002aa7
sub rax, 2
cmp rax, rcx
jae 0x140002a96
jmp 0x140002aaf
sub rax, rcx
sar rax, 1
jmp 0x140002ab1
mov eax, edi
mov r8d, r15d
test eax, eax
cmovns r8d, eax
inc r8d
mov r9d, 6
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.1400050c0
mov r14, rax
cmp rsi, rax
je 0x140002b39
mov rdx, qword [rsi]
test rdx, rdx
je 0x140002b26
mov ecx, edi
lock xadd dword [rdx], ecx
cmp ecx, 1
jne 0x140002b1e
mov rbx, qword [rsi]
test rbx, rbx
je 0x140002b1e
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140002b03
call fcn.14000ea64
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140002b11
call fcn.14000ea64
mov edx, 0x28
mov rcx, rbx
call fcn.140009be0
mov qword [rsi], r15
mov rbx, qword [rsp + 0x30]
mov rax, qword [r14]
mov qword [rsi], rax
test rax, rax
je 0x140002b39
lock inc dword [rax]
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x140002b8b
mov ecx, edi
lock xadd dword [rax], ecx
cmp ecx, 1
jne 0x140002b81
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140002b81
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140002b66
call fcn.14000ea64
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140002b74
call fcn.14000ea64
mov edx, 0x28
mov rcx, rbx
call fcn.140009be0
mov qword [rsp + 0x40], r15
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x140002cd8
lock xadd dword [rbx], edi
cmp edi, 1
jne 0x140002bcb
mov rbx, qword [rsp + 0x30]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140002bb0
call fcn.14000ea64
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140002bbe
call fcn.14000ea64
mov edx, 0x28
mov rcx, rbx
call fcn.140009be0
mov qword [rsp + 0x30], r15
jmp 0x140002cd8
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8d, [r9 + 1]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140002cd8
mov dword [rsp + 0x38], 0x1000
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x470]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.PortName
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140002ccf
cmp dword [rsp + 0x38], 0x1000
ja 0x140002ccf
mov rcx, rsi
call fcn.1400049b0
cmp word [rbp + 0x470], 0
je 0x140002cc5
lea rax, [rbp + 0x470]
or rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140002c70
mov rdx, rdi
mov rcx, qword [rsi]
call fcn.140005a60
mov rbx, qword [rsi]
cmp qword [rbx + 0x10], 0
jne 0x140002c9f
mov rcx, qword [rbx + 0x18]
add rcx, rcx
call fcn.14000ea5c
mov qword [rbx + 0x10], rax
lea rcx, [rbp + 0x470]
mov rax, qword [rsi]
mov rdx, qword [rax + 0x10]
nop dword [rax]
movzx eax, word [rcx]
mov word [rdx], ax
lea rcx, [rcx + 2]
lea rdx, [rdx + 2]
test ax, ax
jne 0x140002cb0
jmp 0x140002ccf
xor edx, edx
mov rcx, qword [rsi]
call fcn.140005a60
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x2470]
xor rcx, rsp
call fcn.140009b90
mov rbx, qword [rsp + 0x25c8]
add rsp, 0x2580
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret