Function at 0x140006180
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.14000bbec
mov rcx, rax
xor r13d, r13d
mov edx, r13d
test rax, rax
setne dl
test edx, edx
jne 0x1400061de
mov ecx, 0x80004005
call fcn.140002000
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 0x140006238
test rbx, 0xffffffffffff0000
jne 0x140006225
movzx ebx, bx
mov ecx, ebx
call fcn.14000c240
test rax, rax
je 0x140006250
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001b50
mov rdi, qword [rsp + 0x40]
jmp 0x140006250
xor eax, eax
mov rcx, rsi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x14000623b
mov ecx, r13d
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140001e50
mov rdi, qword [rsp + 0x40]
mov word [rsp + 0x60], r13w
cmp dword [rdi - 0x10], 0
jne 0x14000627b
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006274
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006712
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.14000a340
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 0x140006317
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 0x14000630c
cmp dword [rsp + 0x34], 1
jne 0x14000630c
lea r8, [rsp + 0x260]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140021f88
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 0x14000634c
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140006345
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006712
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140021f88
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022178
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 0x140006423
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140021f88
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.140022178
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 0x140006423
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x14000641c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140006712
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 0x1400064e8
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 0x1400064d8
cmp dword [rsp + 0x34], 1
jne 0x1400064d8
mov r9, r12
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x260]
mov rcx, rbp
call fcn.140005770
mov edi, eax
test eax, eax
jle 0x1400064d8
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 0x1400064d1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006712
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400066f8
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 0x1400065f1
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 0x1400065e6
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x14000659d
cmp eax, 2
jne 0x1400065e6
mov r8d, 0x104
lea rdx, [rsp + 0x780]
lea rcx, [rsp + 0x360]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14000659d
lea r8, [rsp + 0x780]
mov edx, 0x104
lea rcx, [rsp + 0x360]
call fcn.140021f88
mov r9, r12
lea r8, [rsp + 0x360]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.140005df0
mov edi, eax
test eax, eax
jle 0x1400065e6
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 0x1400065df
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006712
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 0x1400066f8
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 0x1400066ec
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x1400066a6
cmp eax, 2
jne 0x1400066ec
mov r8d, 0x104
lea rdx, [rsp + 0x990]
lea rcx, [rsp + 0x570]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400066a6
lea r8, [rsp + 0x990]
mov edx, 0x104
lea rcx, [rsp + 0x570]
call fcn.140021f88
mov r9, r12
lea r8, [rsp + 0x570]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.140005df0
mov edi, eax
test eax, eax
jle 0x1400066ec
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 0x1400066e8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140006712
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 0x140006710
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.1400215a0
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret