Function at 0x14003fa40
Capabilities:
Query or enumerate registry value

Disassembly:
push r12
push r14
sub rsp, 0x88
test rdx, rdx
mov r14, r9
mov r12, r8
jne 0x14003fa83
mov rdx, qword [r8]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003fa75
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 0x14003fa56
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 0x14003fdd6
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 0x14003fb29
test rbx, rbx
je 0x14003fb05
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 0x14003fb25
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14003fb76
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0xb8], rsi
mov qword [rsp + 0x78], r13
sub eax, 1
je 0x14003fc93
sub eax, 2
je 0x14003fbe8
cmp eax, 1
je 0x14003fb92
test rbx, rbx
je 0x14003fb5f
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r12
call fcn.1400c5dd0
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 0x14003fd9a
cmp dword [rsp + 0x44], 4
mov esi, ebp
mov r13d, SafeArrayDestroy
cmovne esi, r13d
jmp 0x14003fd9a
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 0x14003fc2d
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 0x14003fd9a
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 0x14003fd9a
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 0x14003fcfa
mov eax, dword [rsp + 0x4c]
cmp eax, 1
je 0x14003fcf0
cmp eax, 2
je 0x14003fcf0
mov esi, r13d
jmp 0x14003fcfa
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.14022a8c0
mov rdi, qword [r14 + 8]
test rdi, rdi
je 0x14003fd8d
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 0x14003fd8d
mov eax, dword [rsp + 0x40]
cmp eax, 1
je 0x14003fd68
cmp eax, 2
je 0x14003fd68
mov esi, r13d
jmp 0x14003fd8d
test rdi, rdi
je 0x14003fd8b
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x14003fd88
test al, 1
jne 0x14003fd83
shr rax, 1
cmp word [rdi + rax*2 - 2], bp
je 0x14003fd8b
mov esi, r13d
jmp 0x14003fd8d
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 0x14003fdae
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 0x14003fdcf
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, ebp
jmp 0x14003fb69
mov rdx, qword [r12]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003fdf6
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