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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4d0]
sub rsp, 0x5d0
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x610], rbx
mov rax, qword [0x14007a6a0]
xor rax, rsp
mov qword [rbp + 0x4c0], rax
mov r12, r9
mov r15, r8
mov rdi, rdx
xor esi, esi
mov word [rbp + 0xa0], si
call fcn.1400179f4
mov rcx, rax
test rax, rax
je 0x140012729
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, str.TypeLib_
lea rcx, [rsp + 0x48]
call fcn.140001f80
test al, al
jne 0x1400123a5
lea rdx, str.TypeLib_
lea rcx, [rsp + 0x48]
call fcn.140003140
nop
mov r14, 0xffffffffffffffff
test rdi, rdi
jne 0x1400123b5
mov eax, esi
jmp 0x1400123ca
mov rax, r14
nop dword [rax + rax]
inc rax
cmp word [rdi + rax*2], 0
jne 0x1400123c0
mov r8d, eax
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.140002920
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rbx, qword [rsp + 0x48]
mov rdx, rbx
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14001246d
lea rdx, str.Wow6432NodeTypeLib_
lea rcx, [rsp + 0x48]
call fcn.140003140
test rdi, rdi
jne 0x140012420
mov eax, esi
jmp 0x14001242d
mov rax, r14
inc rax
cmp word [rdi + rax*2], 0
jne 0x140012423
mov r8d, eax
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.140002920
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rbx, qword [rsp + 0x48]
mov rdx, rbx
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400126e4
mov dword [rsp + 0x50], 0x80
xor edi, edi
mov r13d, edi
xor edx, edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x44], 0x40
lea r9, [rsp + 0x44]
lea r8, [rbp + 0x20]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov rcx, qword [rsp + 0x58]
test eax, eax
jne 0x1400126dd
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400126a9
mov dword [rsp + 0x40], 0x40
mov esi, edi
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x60]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x14001269e
nop dword [rax]
nop word [rax + rax]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp - 0x60]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001265e
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.win32
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400125b0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.win64
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140012653
mov dword [rsp + 0x50], 0x105
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140012648
mov ecx, dword [rsp + 0x70]
lea eax, [rcx - 1]
cmp eax, 1
ja 0x140012648
cmp ecx, 2
jne 0x14001262e
mov r8d, 0x104
lea rdx, [rbp + 0x2b0]
lea rcx, [rbp + 0xa0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14001262e
lea r8, [rbp + 0x2b0]
mov edx, 0x104
lea rcx, [rbp + 0xa0]
call fcn.14003f5e0
mov r9, r12
lea r8, [rbp + 0xa0]
mov rdx, r15
call fcn.140012740
mov edi, eax
test eax, eax
jg 0x1400126b4
xor edi, edi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
mov dword [rsp + 0x40], 0x40
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x60]
mov edx, esi
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x140012530
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc r13d
mov edx, r13d
jmp 0x14001247c
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x1400126d9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x1400126ff
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x1400126fd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rbp + 0x4c0]
xor rcx, rsp
call fcn.1400361e0
mov rbx, qword [rsp + 0x610]
add rsp, 0x5d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400024c0
int3