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

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4f0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14004b138]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
mov rsi, rcx
xor r15d, r15d
mov r14b, r15b
mov r12b, r15b
lea ebx, [r15 + 4]
lea rdi, [0x140002ec8]
mov ecx, dword [0x14004c654]
cmp ecx, r15d
je 0x1400129e5
cmp byte [0x14004c611], r15b
je 0x1400129b2
mov al, byte [0x14004c658]
cmp al, bl
jae 0x1400129c1
cmp al, r15b
jne 0x1400129eb
jmp 0x1400129c1
mov al, byte [0x14004c658]
cmp al, bl
jae 0x1400129c1
cmp al, r15b
jne 0x1400129eb
mov r8, rdi
lea rdx, [0x140003038]
mov rcx, qword [0x14004c628]
call fcn.14000c98c
mov al, byte [0x14004c658]
mov ecx, dword [0x14004c654]
jmp 0x1400129eb
mov al, byte [0x14004c658]
cmp qword [rsi + 0x10], r15
je 0x140012a31
cmp ecx, r15d
je 0x140012a29
cmp byte [0x14004c611], r15b
je 0x140012a0a
cmp al, bl
jae 0x140012a13
cmp al, r15b
jne 0x140012a29
jmp 0x140012a13
cmp al, bl
jae 0x140012a13
cmp al, r15b
jne 0x140012a29
mov r8, rdi
lea rdx, [0x140003048]
mov rcx, qword [0x14004c628]
call fcn.14000c98c
mov eax, dword [rsi + 8]
jmp 0x1400130f8
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
lea rdx, [0x1400038d0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, r15d
je 0x140012aac
cmp dword [0x14004c654], r15d
je 0x140012aa5
cmp byte [0x14004c611], r15b
je 0x140012a80
mov al, byte [0x14004c658]
cmp al, bl
jae 0x140012a8f
cmp al, r15b
jne 0x140012aa5
jmp 0x140012a8f
mov al, byte [0x14004c658]
cmp al, bl
jae 0x140012a8f
cmp al, r15b
jne 0x140012aa5
mov r8, rdi
lea rdx, [0x140003048]
mov rcx, qword [0x14004c628]
call fcn.14000c98c
xor eax, eax
jmp 0x1400130f8
mov ebp, r15d
mov edi, 0x80
mov dword [rsp + 0x58], 0x104
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x2d0]
mov edx, ebp
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov r13d, eax
cmp eax, r15d
jne 0x140012f5c
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
lea rdx, [rsp + 0x2d0]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, r15d
jne 0x140012f5c
xor edx, edx
lea r8d, [rdx + 0x40]
lea rcx, [rsp + 0x80]
call sub.msvcrt.dll_memset
mov dword [rsp + 0x40], ebx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003ac8]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140012f34
cmp dword [rsp + 0x44], ebx
jne 0x140012f34
bt dword [rsp + 0xc0], 0xe
jae 0x140012f34
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.ole32.dll_CLSIDFromString]
cmp eax, r15d
jne 0x140012f34
mov dword [rsp + 0x40], ebx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003b00]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140012c03
cmp dword [rsp + 0x44], ebx
jne 0x140012c03
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0xa8], eax
jmp 0x140012c0b
mov dword [rsp + 0xa8], r15d
mov dword [rsp + 0x40], ebx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003b40]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140012c5f
cmp dword [rsp + 0x44], ebx
jne 0x140012c5f
cmp dword [rsp + 0xc0], 1
sete al
mov byte [rsp + 0xac], al
jmp 0x140012c69
mov al, r15b
mov byte [rsp + 0xac], al
or r12b, al
mov dword [rsp + 0x40], ebx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003b70]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140012cc0
cmp dword [rsp + 0x44], ebx
jne 0x140012cc0
cmp dword [rsp + 0xc0], 1
sete al
mov byte [rsp + 0xad], al
jmp 0x140012cca
mov al, r15b
mov byte [rsp + 0xad], al
or r14b, al
mov dword [rsp + 0x40], r15d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003ba0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x40]
cmp ecx, edi
ja 0x140012d40
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003ba0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x40]
cmp eax, r15d
jne 0x140012f34
cmp ecx, edi
ja 0x140012f34
cmp dword [rsp + 0x44], 3
jne 0x140012f34
mov eax, r15d
lea rcx, [rsp + 0xc0]
cmp word [rcx], r15w
je 0x140012d77
inc eax
add rcx, 2
cmp eax, edi
jb 0x140012d67
cmp eax, edi
jae 0x140012f34
mov dword [rsp + 0x90], eax
mov ecx, eax
mov rax, rbx
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140039c90
mov qword [rsp + 0x98], rax
cmp rax, r15
je 0x140012f3c
mov r9d, r15d
cmp dword [rsp + 0x90], r15d
jbe 0x140012def
mov rdx, r15
lea r8, [rsp + 0xc0]
movzx ecx, word [r8]
mov dword [rdx + rax], ecx
inc r9d
add r8, 2
add rdx, rbx
cmp r9d, dword [rsp + 0x90]
jae 0x140012def
mov rax, qword [rsp + 0x98]
jmp 0x140012dca
mov dword [rsp + 0x40], 0x208
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [0x140003bd0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140012f34
cmp dword [rsp + 0x44], 1
je 0x140012e43
cmp dword [rsp + 0x44], 2
jne 0x140012f34
xor r8d, r8d
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
cmp eax, r15d
je 0x140012f34
cmp eax, 0x104
ja 0x140012f34
lea edi, [rax + 1]
mov ecx, edi
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140039c90
mov qword [rsp + 0xb0], rax
cmp rax, r15
je 0x140012f34
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, ebx
jne 0x140012f34
mov ecx, dword [rsi + 8]
inc ecx
mov edi, 0x40
mov rax, rdi
mul rcx
lea rcx, [rdi - 0x41]
cmovo rax, rcx
mov rcx, rax
call fcn.140039c90
mov rbx, rax
cmp rax, r15
je 0x140012f34
mov rdx, qword [rsi + 0x10]
cmp rdx, r15
je 0x140012f05
mov r8d, dword [rsi + 8]
shl r8, 6
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x10]
call fcn.140039c9c
mov qword [rsi + 0x10], rbx
mov eax, dword [rsi + 8]
shl rax, 6
lea rcx, [rax + rbx]
lea rdx, [rsp + 0x80]
mov r8, rdi
call sub.msvcrt.dll_memcpy
inc dword [rsi + 8]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140012f5c
mov rax, qword [rsp + 0x98]
mov rcx, rax
call fcn.140039c9c
mov rcx, qword [rsp + 0xb0]
call fcn.140039c9c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebp
cmp r13d, r15d
mov ebx, 4
lea edi, [rbx + 0x7c]
je 0x140012ab4
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [rsi + 0x21], r15b
mov byte [rsi + 0x20], r15b
lea r8, [rsi + 0x30]
lea rdx, [rsi + 0x28]
mov rcx, rsi
call fcn.1400133c4
mov rcx, rsi
call fcn.1400132d0
lea rbp, [0x140003924]
cmp r12b, r15b
jne 0x140013025
cmp qword [rsi + 0x90], r15
je 0x140013025
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x68], rax
cmp rax, r15
jne 0x140012fd0
mov ecx, 0x8007000e
call fcn.140007c44
nop
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, r15
jne 0x140012ff1
mov ecx, 0x8007000e
call fcn.140007c44
nop
mov rcx, qword [rsi + 0x90]
mov rax, qword [rcx]
mov qword [rsp + 0x20], rbx
mov r9, rdi
mov edx, 0x80000077
mov r8d, 2
call qword [rax + 0x18]
nop
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp r14b, r15b
jne 0x1400130a9
cmp qword [rsi + 0x90], r15
je 0x1400130a9
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x60], rax
cmp rax, r15
jne 0x140013054
mov ecx, 0x8007000e
call fcn.140007c44
nop
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x68], rax
cmp rax, r15
jne 0x140013075
mov ecx, 0x8007000e
call fcn.140007c44
nop
mov rcx, qword [rsi + 0x90]
mov rax, qword [rcx]
mov qword [rsp + 0x20], rbx
mov r9, rdi
mov edx, 0x80000078
mov r8d, 2
call qword [rax + 0x18]
nop
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [0x14004c654], r15d
je 0x1400130f5
cmp byte [0x14004c611], r15b
je 0x1400130cc
mov al, byte [0x14004c658]
cmp al, 4
jae 0x1400130db
cmp al, r15b
jne 0x1400130f5
jmp 0x1400130db
mov al, byte [0x14004c658]
cmp al, 4
jae 0x1400130db
cmp al, r15b
jne 0x1400130f5
lea r8, [0x140002ec8]
lea rdx, [0x140003048]
mov rcx, qword [0x14004c628]
call fcn.14000c98c
mov eax, dword [rsi + 8]
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.14003a6d0
lea r11, [rsp + 0x4f0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret