Function at 0x14003f790
Capabilities:
Query or enumerate registry value

Disassembly:
push r12
push r14
sub rsp, 0x88
test rdx, rdx
mov r14, r9
mov r12, r8
jne 0x14003f7d3
mov rdx, qword [r8]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003f7c5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
add rsp, 0x88
pop r14
pop r12
ret
test r9, r9
je 0x14003f7a6
xor eax, eax
mov qword [rsp + 0xb0], rbp
xor ebp, ebp
mov qword [r9], rax
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], rax
lea rax, [rsp + 0x58]
lea r9d, [rbp + 1]
xor r8d, r8d
mov dword [rsp + 0x34], ebp
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003fb26
mov rdx, qword [r12]
mov qword [rsp + 0xa0], rbx
mov rbx, qword [rsp + 0x58]
lea r9, [rsp + 0x34]
mov rcx, rbx
xor r8d, r8d
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14003f879
test rbx, rbx
je 0x14003f855
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [r12]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003f875
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14003f8c6
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0xb8], rsi
mov qword [rsp + 0x78], r13
sub eax, 1
je 0x14003f9e3
sub eax, 2
je 0x14003f938
cmp eax, 1
je 0x14003f8e2
test rbx, rbx
je 0x14003f8af
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r12
call fcn.140006b30
xor eax, eax
mov rsi, qword [rsp + 0xb8]
mov r13, qword [rsp + 0x78]
mov rbx, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0xb0]
add rsp, 0x88
pop r14
pop r12
ret
lea rcx, [rsp + 0x48]
mov word [r14], 0x13
mov rdx, qword [r12]
mov qword [rsp + 0x28], rcx
lea rax, [r14 + 8]
lea r9, [rsp + 0x44]
mov rcx, rbx
xor r8d, r8d
mov dword [rsp + 0x48], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov esi, eax
jne 0x14003faea
cmp dword [rsp + 0x44], 4
mov esi, ebp
mov r13d, SafeArrayDestroy
cmovne esi, r13d
jmp 0x14003faea
mov rdx, qword [r12]
lea rax, [rsp + 0xa8]
lea r9, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rbp
mov dword [rsp + 0xa8], ebp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov esi, eax
jne 0x14003f97d
cmp dword [rsp + 0x3c], 3
mov esi, ebp
mov r13d, SafeArrayDestroy
cmovne esi, r13d
mov eax, dword [rsp + 0xa8]
lea r8, [rsp + 0x50]
mov edx, 1
mov cx, 0x11
mov dword [rsp + 0x54], ebp
mov word [r14], 0x2011
mov dword [rsp + 0x50], eax
call qword [sym.imp.OLEAUT32.dll_SafeArrayDestroy]
test rax, rax
mov qword [r14 + 8], rax
je 0x14003faea
mov rax, qword [rax + 0x10]
mov rdx, qword [r12]
lea rcx, [rsp + 0xa8]
mov qword [rsp + 0x28], rcx
lea r9, [rsp + 0x60]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x14003faea
mov word [r14], 0x1f
mov rdx, qword [r12]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x80], rdi
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x20], rbp
mov dword [rsp + 0x30], ebp
mov r15d, ebp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r13d, SafeArrayDestroy
test eax, eax
mov esi, eax
jne 0x14003fa4a
mov eax, dword [rsp + 0x4c]
cmp eax, 1
je 0x14003fa40
cmp eax, 2
je 0x14003fa40
mov esi, r13d
jmp 0x14003fa4a
mov r15d, dword [rsp + 0x30]
mov esi, ebp
shr r15d, 1
mov edi, r15d
add rdi, rdi
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov r8, rdi
xor edx, edx
mov rcx, rax
mov qword [r14 + 8], rax
call fcn.1402197d0
mov rdi, qword [r14 + 8]
test rdi, rdi
je 0x14003fadd
mov rdx, qword [r12]
lea eax, [r15 + r15]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0x38]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov esi, eax
jne 0x14003fadd
mov eax, dword [rsp + 0x40]
cmp eax, 1
je 0x14003fab8
cmp eax, 2
je 0x14003fab8
mov esi, r13d
jmp 0x14003fadd
test rdi, rdi
je 0x14003fadb
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x14003fad8
test al, 1
jne 0x14003fad3
shr rax, 1
cmp word [rdi + rax*2 - 2], bp
je 0x14003fadb
mov esi, r13d
jmp 0x14003fadd
mov word [rdi], bp
mov esi, ebp
mov rdi, qword [rsp + 0x80]
mov r15, qword [rsp + 0x70]
test esi, esi
sete bpl
test rbx, rbx
je 0x14003fafe
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [r12]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003fb1f
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, ebp
jmp 0x14003f8b9
mov rdx, qword [r12]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003fb46
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rbp, qword [rsp + 0xb0]
add rsp, 0x88
pop r14
pop r12
ret