Function at 0x140006470
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0xbb0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xbe0], rbx
mov rax, qword [0x14004b200]
xor rax, rsp
mov qword [rsp + 0xba0], rax
mov r12, r8
mov rbx, rdx
mov rbp, rcx
call fcn.14000bcac
mov rcx, rax
xor r13d, r13d
mov edx, r13d
test rax, rax
setne dl
test edx, edx
jne 0x1400064ce
mov ecx, 0x80004005
call fcn.140002350
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x40], rdi
or rsi, 0xffffffffffffffff
test rbx, rbx
je 0x140006528
test rbx, 0xffffffffffff0000
jne 0x140006515
movzx ebx, bx
mov ecx, ebx
call fcn.14000c328
test rax, rax
je 0x140006540
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001ea0
mov rdi, qword [rsp + 0x40]
jmp 0x140006540
xor eax, eax
mov rcx, rsi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x14000652b
mov ecx, r13d
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.1400021a0
mov rdi, qword [rsp + 0x40]
mov word [rsp + 0x60], r13w
cmp dword [rdi - 0x10], 0
jne 0x14000656b
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006564
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a02
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.14000a430
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
mov rbx, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140006607
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400065fc
cmp dword [rsp + 0x34], 1
jne 0x1400065fc
lea r8, [rsp + 0x260]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140022470
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x60]
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
jne 0x14000663c
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006635
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a02
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022470
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022660
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x160]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140006713
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022470
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022660
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x160]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140006713
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x14000670c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a02
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.TypeLib
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400067d8
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400067c8
cmp dword [rsp + 0x34], 1
jne 0x1400067c8
mov r9, r12
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x260]
mov rcx, rbp
call fcn.140005a60
mov edi, eax
test eax, eax
jle 0x1400067c8
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400067c1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a02
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400069e8
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.InprocServer32
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400068e1
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x360]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400068d6
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x14000688d
cmp eax, 2
jne 0x1400068d6
mov r8d, 0x104
lea rdx, [rsp + 0x780]
lea rcx, [rsp + 0x360]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14000688d
lea r8, [rsp + 0x780]
mov edx, 0x104
lea rcx, [rsp + 0x360]
call fcn.140022470
mov r9, r12
lea r8, [rsp + 0x360]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.1400060e0
mov edi, eax
test eax, eax
jle 0x1400068d6
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400068cf
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a02
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.LocalServer32
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400069e8
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x570]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400069dc
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140006996
cmp eax, 2
jne 0x1400069dc
mov r8d, 0x104
lea rdx, [rsp + 0x990]
lea rcx, [rsp + 0x570]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140006996
lea r8, [rsp + 0x990]
mov edx, 0x104
lea rcx, [rsp + 0x570]
call fcn.140022470
mov r9, r12
lea r8, [rsp + 0x570]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.1400060e0
mov edi, eax
test eax, eax
jle 0x1400069dc
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400069d8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a02
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006a00
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rsp + 0xba0]
xor rcx, rsp
call fcn.1400216a0
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret