Function at 0x1400114e0
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.140015d90
mov rcx, rax
test rax, rax
jne 0x140011537
mov ecx, 0x80004005
call fcn.140002430
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 0x14001158c
test rsi, 0xffffffffffff0000
jne 0x14001157c
movzx esi, si
mov ecx, esi
call fcn.140016424
test rax, rax
je 0x1400115a4
mov r8d, esi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001ea0
jmp 0x14001159f
mov rax, rdi
nop
inc rax
cmp word [rsi + rax*2], r15w
jne 0x140011580
jmp 0x14001158f
mov eax, r15d
mov r8d, eax
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.1400022a0
mov rbx, qword [rsp + 0x40]
mov word [rsp + 0x60], r15w
cmp dword [rbx - 0x10], 0
je 0x140011962
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.14000f310
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 0x14001164e
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 0x140011643
cmp dword [rsp + 0x34], 1
jne 0x140011643
lea r8, [rbp + 0x160]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140040390
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 0x140011656
test rax, rax
je 0x140011962
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040390
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.1400403f8
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 0x14001170d
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140040390
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.1400403f8
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 0x140011962
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 0x140011795
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 0x140011956
cmp dword [rsp + 0x34], 1
jne 0x140011956
mov r9, r14
lea r8, [rsp + 0x60]
lea rdx, [rbp + 0x160]
call fcn.140010e20
jmp 0x14001194c
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 0x140011890
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 0x140011885
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140011841
cmp eax, 2
jne 0x140011885
mov r8d, 0x104
lea rdx, [rbp + 0x680]
lea rcx, [rbp + 0x260]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140011841
lea r8, [rbp + 0x680]
mov edx, 0x104
lea rcx, [rbp + 0x260]
call fcn.140040390
mov r9, r14
lea r8, [rbp + 0x260]
lea rdx, [rsp + 0x60]
call fcn.140011250
mov esi, eax
test eax, eax
jle 0x140011885
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 0x14001187e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
jmp 0x14001197b
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 0x140011962
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 0x140011956
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140011938
cmp eax, 2
jne 0x140011956
mov r8d, 0x104
lea rdx, [rbp + 0x890]
lea rcx, [rbp + 0x470]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140011938
lea r8, [rbp + 0x890]
mov edx, 0x104
lea rcx, [rbp + 0x470]
call fcn.140040390
mov r9, r14
lea r8, [rbp + 0x470]
lea rdx, [rsp + 0x60]
call fcn.140011250
test eax, eax
mov esi, eax
jg 0x14001185b
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 0x140011979
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.140037060
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret