Function at 0x140006480
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.14000bb5c
mov rcx, rax
xor r13d, r13d
mov edx, r13d
test rax, rax
setne dl
test edx, edx
jne 0x1400064de
mov ecx, 0x80004005
call fcn.140002330
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 0x140006538
test rbx, 0xffffffffffff0000
jne 0x140006525
movzx ebx, bx
mov ecx, ebx
call fcn.14000c1b8
test rax, rax
je 0x140006550
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001e70
mov rdi, qword [rsp + 0x40]
jmp 0x140006550
xor eax, eax
mov rcx, rsi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x14000653b
mov ecx, r13d
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140002180
mov rdi, qword [rsp + 0x40]
mov word [rsp + 0x60], r13w
cmp dword [rdi - 0x10], 0
jne 0x14000657b
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006574
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a12
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.14000a2f0
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 0x140006617
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 0x14000660c
cmp dword [rsp + 0x34], 1
jne 0x14000660c
lea r8, [rsp + 0x260]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140022260
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 0x14000664c
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006645
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a12
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022260
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022434
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 0x140006723
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022260
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022434
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 0x140006723
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x14000671c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006a12
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 0x1400067e8
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 0x1400067d8
cmp dword [rsp + 0x34], 1
jne 0x1400067d8
mov r9, r12
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x260]
mov rcx, rbp
call fcn.140005a70
mov edi, eax
test eax, eax
jle 0x1400067d8
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 0x1400067d1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a12
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400069f8
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 0x1400068f1
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 0x1400068e6
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x14000689d
cmp eax, 2
jne 0x1400068e6
mov r8d, 0x104
lea rdx, [rsp + 0x780]
lea rcx, [rsp + 0x360]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14000689d
lea r8, [rsp + 0x780]
mov edx, 0x104
lea rcx, [rsp + 0x360]
call fcn.140022260
mov r9, r12
lea r8, [rsp + 0x360]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.1400060f0
mov edi, eax
test eax, eax
jle 0x1400068e6
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 0x1400068df
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a12
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 0x1400069f8
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 0x1400069ec
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x1400069a6
cmp eax, 2
jne 0x1400069ec
mov r8d, 0x104
lea rdx, [rsp + 0x990]
lea rcx, [rsp + 0x570]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400069a6
lea r8, [rsp + 0x990]
mov edx, 0x104
lea rcx, [rsp + 0x570]
call fcn.140022260
mov r9, r12
lea r8, [rsp + 0x570]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.1400060f0
mov edi, eax
test eax, eax
jle 0x1400069ec
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 0x1400069e8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006a12
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 0x140006a10
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.1400214b0
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret