Function at 0x140016af0
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x1402cece8]
xor rax, rsp
mov qword [rbp + 0x70], rax
call fcn.140016860
mov rcx, rax
test rax, rax
jne 0x140016b43
mov ecx, 0x80004005
call fcn.140016620
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rdx, str.SoftwareSBAMSvc
or r14, 0xffffffffffffffff
cmp rdx, 0x10000
jae 0x140016b75
movzx edx, dx
lea rcx, [rsp + 0x38]
call fcn.140016fb0
jmp 0x140016b98
mov rax, r14
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x140016b80
mov r8d, eax
lea rcx, [rsp + 0x38]
call fcn.1400164c0
nop
call fcn.140016860
mov rcx, rax
test rax, rax
jne 0x140016bb0
mov ecx, 0x80004005
call fcn.140016620
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, str.EnterpriseProductCode
cmp rdx, 0x10000
jae 0x140016bde
movzx edx, dx
lea rcx, [rsp + 0x48]
call fcn.140016fb0
jmp 0x140016bf9
mov rax, r14
inc rax
cmp word [rdx + rax*2], 0
jne 0x140016be1
mov r8d, eax
lea rcx, [rsp + 0x48]
call fcn.1400164c0
nop
xor r15b, r15b
xor r12d, r12d
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x58], r12d
mov qword [rsp + 0x60], r12
mov r9d, 0x20119
mov rbx, qword [rsp + 0x38]
mov r8, rbx
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x50]
call fcn.140016e80
mov rdi, qword [rsp + 0x48]
test eax, eax
je 0x140016c5e
mov r9d, 0x20219
mov r8, rbx
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x50]
call fcn.140016e80
test eax, eax
je 0x140016c5e
mov rsi, qword [rsp + 0x50]
jmp 0x140016d3c
xor edx, edx
mov r8d, 0x100
lea rcx, [rsp + 0x70]
call fcn.1401cb280
mov dword [rsp + 0x30], 0xfe
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rdi
mov rsi, qword [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x140016ce4
mov eax, dword [rsp + 0x40]
dec eax
cmp eax, 1
jbe 0x140016cbd
mov ebx, 0xd
jmp 0x140016ce4
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140016cdb
test al, 1
jne 0x140016cd4
shr rax, 1
cmp word [rsp + rax*2 + 0x6e], 0
je 0x140016ce1
mov ebx, 0xd
jmp 0x140016ce4
mov word [rsp + 0x70], r12w
mov ebx, r12d
test ebx, ebx
sete r15b
test rsi, rsi
je 0x140016d00
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, r12
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x58], r12d
test ebx, ebx
jne 0x140016d3c
call fcn.140025880
cmp eax, 2
jl 0x140016d66
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, str.Retrieved_Enterprise_Product_Code_value___s__under_HKLMSoftwareSBAMSvc_key._This_is_an_Enterprise_agent.
lea r8, str.TTS::SKUHelpers::IsEnterpriseSKU
lea rdx, str.Common
lea ecx, [rbx + 2]
call fcn.1400256e0
jmp 0x140016d66
call fcn.140025880
cmp eax, 2
jl 0x140016d66
lea r9, str.Couldnt_get_Enterprise_Product_Code_value_under__HKLMSoftwareSBAMSvc__key._This_is_not_an_Enterprise_agent.
lea r8, str.TTS::SKUHelpers::IsEnterpriseSKU
lea rdx, str.Common
mov ecx, 2
call fcn.1400256e0
nop
test rsi, rsi
je 0x140016d75
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140016d90
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x140016daf
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
movzx eax, r15b
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1401c73d0
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret