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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0xac8]
sub rsp, 0xbb0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14007a6a0]
xor rax, rsp
mov qword [rbp + 0xaa0], rax
mov r14, r8
mov rbx, rdx
call fcn.1400179f4
mov rcx, rax
test rax, rax
je 0x1400130c1
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140001f80
xor esi, esi
lea rdi, [rsi - 1]
test al, al
jne 0x140012cba
test rbx, rbx
jne 0x140012c9d
mov eax, esi
jmp 0x140012ca9
mov rax, rdi
inc rax
cmp word [rbx + rax*2], si
jne 0x140012ca0
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140002300
nop
mov word [rsp + 0x60], si
mov rax, qword [rsp + 0x40]
cmp dword [rax - 0x10], 0
jne 0x140012cd3
lea rdx, [rax - 0x18]
jmp 0x140013085
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.1400105f0
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 0x140012d6d
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 0x140012d62
cmp dword [rsp + 0x34], 1
jne 0x140012d62
lea r8, [rbp + 0x160]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.14003f5e0
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 0x140012d75
test rax, rax
je 0x140013081
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.14003f5e0
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.14003f648
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 0x140012e2c
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.14003f5e0
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.14003f648
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 0x140013081
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 0x140012eb4
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 0x140013075
cmp dword [rsp + 0x34], 1
jne 0x140013075
mov r9, r14
lea r8, [rsp + 0x60]
lea rdx, [rbp + 0x160]
call fcn.140012310
jmp 0x14001306b
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 0x140012faf
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 0x140012fa4
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140012f60
cmp eax, 2
jne 0x140012fa4
mov r8d, 0x104
lea rdx, [rbp + 0x680]
lea rcx, [rbp + 0x260]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140012f60
lea r8, [rbp + 0x680]
mov edx, 0x104
lea rcx, [rbp + 0x260]
call fcn.14003f5e0
mov r9, r14
lea r8, [rbp + 0x260]
lea rdx, [rsp + 0x60]
call fcn.140012740
mov esi, eax
test eax, eax
jle 0x140012fa4
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 0x140012f9d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
jmp 0x14001309a
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 0x140013081
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 0x140013075
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140013057
cmp eax, 2
jne 0x140013075
mov r8d, 0x104
lea rdx, [rbp + 0x890]
lea rcx, [rbp + 0x470]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140013057
lea r8, [rbp + 0x890]
mov edx, 0x104
lea rcx, [rbp + 0x470]
call fcn.14003f5e0
mov r9, r14
lea r8, [rbp + 0x470]
lea rdx, [rsp + 0x60]
call fcn.140012740
test eax, eax
mov esi, eax
jg 0x140012f7a
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 0x140013098
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.1400361e0
lea r11, [rsp + 0xbb0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400024c0
int3