Function at 0x140059f50
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x178], rbx
mov rax, qword [0x14044f8c0]
xor rax, rsp
mov qword [rbp + 0x18], rax
mov r13, r8
mov r15, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rcx
test rdx, rdx
jne 0x140059fa1
xor eax, eax
jmp 0x14005a3f6
test r13, r13
je 0x140059f9a
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14005a428
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rbx, [0x140393240]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.1400168b0
mov r14, 0xffffffffffffffff
test al, al
jne 0x14005a00b
mov rax, r14
nop dword [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x140059ff0
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.140016ad0
nop
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14005a433
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
xor r12d, r12d
mov qword [rsp + 0x60], r12
mov dword [rsp + 0x68], r12d
mov qword [rsp + 0x70], r12
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp - 0x70]
call fcn.1402ef020
mov qword [r13], r12
mov rcx, qword [r15 + 0x10]
movzx eax, word [rcx]
cmp ax, word [0x140393240]
je 0x14005a1bc
movups xmm0, xmmword [0x1403920e0]
movups xmmword [rbp - 0x80], xmm0
cmp dword [rcx - 8], 1
jle 0x14005a087
mov edx, dword [rcx - 0x10]
lea rcx, [r15 + 0x10]
call fcn.1400124b0
mov rcx, qword [r15 + 0x10]
lea rdx, [rbp - 0x80]
call qword [sym.imp.ole32.dll_CLSIDFromString]
mov rcx, qword [r15 + 0x10]
test rcx, rcx
jne 0x14005a09f
mov eax, r12d
jmp 0x14005a0b0
movsxd rdx, dword [rcx - 0xc]
call fcn.1402f3448
test eax, eax
js 0x14005a43e
mov rcx, qword [r15 + 0x10]
cmp eax, dword [rcx - 0xc]
jg 0x14005a43e
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [r15 + 0x10]
mov word [rax + rcx*2], r12w
mov rax, qword [rbp - 0x80]
cmp rax, qword [0x1403920e0]
jne 0x14005a0ea
mov rax, qword [rbp - 0x78]
cmp rax, qword [0x1403920e8]
je 0x14005a1bc
cmp dword [r15 + 0x18], 0
jne 0x14005a1bc
lea rdx, str.SYSTEMCurrentControlSetControlMediaCategories_
mov rax, r14
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x14005a100
mov r8d, eax
lea rcx, [rsp + 0x40]
call fcn.140016ad0
mov rdx, qword [r15 + 0x10]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140016630
mov r9d, 0x20019
mov r8, qword [rsp + 0x40]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x60]
call fcn.140024490
test eax, eax
jne 0x14005a3a3
mov dword [rsp + 0x38], 0x80
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
xor r8d, r8d
lea rdx, str.Name
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14005a3a3
mov eax, dword [rsp + 0x48]
dec eax
cmp eax, 1
ja 0x14005a3a3
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x14005a283
test al, 1
jne 0x14005a3a3
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
jne 0x14005a3a3
mov rax, qword [rdi + 8]
mov rsi, qword [rax + 0x1ad8]
test rsi, rsi
je 0x14005a38e
mov rdi, qword [rsi + 0x10]
mov rsi, qword [rsi]
test rdi, rdi
je 0x14005a1c7
mov rax, qword [rdi]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [rax + 0x28]
test eax, eax
je 0x14005a1c7
mov edx, 0x5c
mov rcx, qword [rsp + 0x30]
call fcn.1402ee838
test rax, rax
je 0x14005a1c7
mov rcx, qword [rsp + 0x30]
sub rax, rcx
sar rax, 1
test eax, eax
js 0x14005a1c7
movsxd rbx, dword [rcx - 0x10]
test ebx, ebx
js 0x14005a41d
mov edx, 1
sub edx, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, ebx
or eax, edx
jge 0x14005a23f
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1400125d0
mov rcx, qword [rsp + 0x30]
lea eax, [rbx + 1]
movsxd rdx, eax
call fcn.1402f3818
mov rax, qword [rsp + 0x30]
cmp ebx, dword [rax - 0xc]
jg 0x14005a454
mov dword [rax - 0x10], ebx
mov rax, qword [rsp + 0x30]
mov word [rax + rbx*2], r12w
mov edx, 0x5c
mov rcx, qword [rsp + 0x30]
call fcn.1402ee838
mov rcx, qword [rsp + 0x30]
test rax, rax
jne 0x14005a28d
mov eax, r14d
jmp 0x14005a293
mov word [rbp - 0x70], r12w
jmp 0x14005a1bc
sub rax, rcx
sar rax, 1
lea r8d, [rax + 1]
mov r9d, dword [rcx - 0x10]
sub r9d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.1400241b0
mov r8, qword [r15 + 8]
test r8, r8
je 0x14005a449
mov rax, qword [rsp + 0x50]
mov rcx, rax
sub r8, rax
nop word [rax + rax]
movzx ebx, word [rcx]
movzx edx, word [rcx + r8]
sub ebx, edx
jne 0x14005a2e4
add rcx, 2
test edx, edx
jne 0x14005a2d0
lea rdx, [rax - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14005a2fe
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test ebx, ebx
jne 0x14005a1c7
cmp qword [rdi + 0xe8], 0
je 0x14005a3a3
cmp dword [r15 + 0x18], ebx
je 0x14005a32b
mov rax, qword [rdi + 0xd8]
mov rcx, qword [rax + 0x10]
mov qword [r13], rcx
jmp 0x14005a39a
mov rdi, qword [rdi + 0xd8]
test rdi, rdi
je 0x14005a39a
mov rsi, rdi
mov rdi, qword [rdi]
mov rsi, qword [rsi + 0x10]
test rsi, rsi
je 0x14005a332
mov rcx, qword [rsi + 0x60]
sub rcx, 0x18
call fcn.140012250
lea rbx, [rax + 0x18]
lea rdx, [rbp - 0x70]
mov rcx, rbx
call fcn.1402f4dc4
test eax, eax
sete r15b
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14005a383
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test r15b, r15b
je 0x14005a332
mov qword [r13], rsi
jmp 0x14005a39a
mov rax, qword [rsp + 0x58]
mov dword [rax + 0x14], 1
cmp qword [r13], 0
setne r12b
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14005a3b4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14005a3d4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x14005a3f3
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, r12d
mov rcx, qword [rbp + 0x18]
xor rcx, rsp
call fcn.1402ecc20
mov rbx, qword [rsp + 0x178]
add rsp, 0x120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80070057
call fcn.140012800
nop
mov ecx, 0x80004005
call fcn.140012800
nop
mov ecx, 0x80004005
call fcn.140012800
nop
mov ecx, 0x80070057
call fcn.140012800
int3
mov ecx, 0x80004005
call fcn.140012800
int3
mov ecx, 0x80070057
call fcn.140012800
int3