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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xab0]
sub rsp, 0xbb0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xbe0], rbx
mov rax, qword [0x140079698]
xor rax, rsp
mov qword [rbp + 0xaa0], rax
mov r14, r8
mov rsi, rdx
call fcn.140015cb0
mov rcx, rax
test rax, rax
jne 0x140011567
mov ecx, 0x80004005
call fcn.1400026e0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
or rdi, 0xffffffffffffffff
xor r15d, r15d
test rsi, rsi
je 0x1400115bc
test rsi, 0xffffffffffff0000
jne 0x1400115ac
movzx esi, si
mov ecx, esi
call fcn.14001633c
test rax, rax
je 0x1400115d4
mov r8d, esi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140002150
jmp 0x1400115cf
mov rax, rdi
nop
inc rax
cmp word [rsi + rax*2], r15w
jne 0x1400115b0
jmp 0x1400115bf
mov eax, r15d
mov r8d, eax
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.140002550
mov rbx, qword [rsp + 0x40]
mov word [rsp + 0x60], r15w
cmp dword [rbx - 0x10], 0
je 0x140011992
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.14000f300
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
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 0x14001167e
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x160]
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 0x140011673
cmp dword [rsp + 0x34], 1
jne 0x140011673
lea r8, [rbp + 0x160]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140040128
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x60]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140011686
test rax, rax
je 0x140011992
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040128
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040190
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14001173d
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040128
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040190
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140011992
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 0x1400117c5
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x160]
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 0x140011986
cmp dword [rsp + 0x34], 1
jne 0x140011986
mov r9, r14
lea r8, [rsp + 0x60]
lea rdx, [rbp + 0x160]
call fcn.140010e50
jmp 0x14001197c
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 0x1400118c0
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 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 0x1400118b5
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140011871
cmp eax, 2
jne 0x1400118b5
mov r8d, 0x104
lea rdx, [rbp + 0x680]
lea rcx, [rbp + 0x260]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140011871
lea r8, [rbp + 0x680]
mov edx, 0x104
lea rcx, [rbp + 0x260]
call fcn.140040128
mov r9, r14
lea r8, [rbp + 0x260]
lea rdx, [rsp + 0x60]
call fcn.140011280
mov esi, eax
test eax, eax
jle 0x1400118b5
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x1400118ae
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
jmp 0x1400119ab
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 0x140011992
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x470]
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 0x140011986
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140011968
cmp eax, 2
jne 0x140011986
mov r8d, 0x104
lea rdx, [rbp + 0x890]
lea rcx, [rbp + 0x470]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140011968
lea r8, [rbp + 0x890]
mov edx, 0x104
lea rcx, [rbp + 0x470]
call fcn.140040128
mov r9, r14
lea r8, [rbp + 0x470]
lea rdx, [rsp + 0x60]
call fcn.140011280
test eax, eax
mov esi, eax
jg 0x14001188b
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x1400119a9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rbp + 0xaa0]
xor rcx, rsp
call fcn.1400371e0
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret