Function at 0x1400366f8
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 [0x140048148]
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, [0x140002648]
mov ecx, dword [0x140049d3c]
cmp ecx, r15d
je 0x1400367a1
cmp byte [0x140049cf9], r15b
je 0x14003676e
mov al, byte [0x140049d40]
cmp al, bl
jae 0x14003677d
cmp al, r15b
jne 0x1400367a7
jmp 0x14003677d
mov al, byte [0x140049d40]
cmp al, bl
jae 0x14003677d
cmp al, r15b
jne 0x1400367a7
mov r8, rdi
lea rdx, [0x140002718]
mov rcx, qword [0x140049d10]
call fcn.14000e000
mov al, byte [0x140049d40]
mov ecx, dword [0x140049d3c]
jmp 0x1400367a7
mov al, byte [0x140049d40]
cmp qword [rsi + 0x10], r15
je 0x1400367ed
cmp ecx, r15d
je 0x1400367e5
cmp byte [0x140049cf9], r15b
je 0x1400367c6
cmp al, bl
jae 0x1400367cf
cmp al, r15b
jne 0x1400367e5
jmp 0x1400367cf
cmp al, bl
jae 0x1400367cf
cmp al, r15b
jne 0x1400367e5
mov r8, rdi
lea rdx, [0x140002728]
mov rcx, qword [0x140049d10]
call fcn.14000e000
mov eax, dword [rsi + 8]
jmp 0x140036eb4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
lea rdx, [0x140006e90]
mov rcx, 0xffffffff80000002
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
cmp eax, r15d
je 0x140036868
cmp dword [0x140049d3c], r15d
je 0x140036861
cmp byte [0x140049cf9], r15b
je 0x14003683c
mov al, byte [0x140049d40]
cmp al, bl
jae 0x14003684b
cmp al, r15b
jne 0x140036861
jmp 0x14003684b
mov al, byte [0x140049d40]
cmp al, bl
jae 0x14003684b
cmp al, r15b
jne 0x140036861
mov r8, rdi
lea rdx, [0x140002728]
mov rcx, qword [0x140049d10]
call fcn.14000e000
xor eax, eax
jmp 0x140036eb4
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.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegEnumKeyExW]
mov r13d, eax
cmp eax, r15d
jne 0x140036d18
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.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
cmp eax, r15d
jne 0x140036d18
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, [0x140006ee8]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140036cf0
cmp dword [rsp + 0x44], ebx
jne 0x140036cf0
bt dword [rsp + 0xc0], 0xe
jae 0x140036cf0
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.ole32.dll_CLSIDFromString]
cmp eax, r15d
jne 0x140036cf0
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, [0x140006f20]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x1400369bf
cmp dword [rsp + 0x44], ebx
jne 0x1400369bf
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0xa8], eax
jmp 0x1400369c7
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, [0x140006f60]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140036a1b
cmp dword [rsp + 0x44], ebx
jne 0x140036a1b
cmp dword [rsp + 0xc0], 1
sete al
mov byte [rsp + 0xac], al
jmp 0x140036a25
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, [0x140006f90]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140036a7c
cmp dword [rsp + 0x44], ebx
jne 0x140036a7c
cmp dword [rsp + 0xc0], 1
sete al
mov byte [rsp + 0xad], al
jmp 0x140036a86
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, [0x140006fc0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x40]
cmp ecx, edi
ja 0x140036afc
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, [0x140006fc0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x40]
cmp eax, r15d
jne 0x140036cf0
cmp ecx, edi
ja 0x140036cf0
cmp dword [rsp + 0x44], 3
jne 0x140036cf0
mov eax, r15d
lea rcx, [rsp + 0xc0]
cmp word [rcx], r15w
je 0x140036b33
inc eax
add rcx, 2
cmp eax, edi
jb 0x140036b23
cmp eax, edi
jae 0x140036cf0
mov dword [rsp + 0x90], eax
mov ecx, eax
mov rax, rbx
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140037718
mov qword [rsp + 0x98], rax
cmp rax, r15
je 0x140036cf8
mov r9d, r15d
cmp dword [rsp + 0x90], r15d
jbe 0x140036bab
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 0x140036bab
mov rax, qword [rsp + 0x98]
jmp 0x140036b86
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, [0x140006ff0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
cmp eax, r15d
jne 0x140036cf0
cmp dword [rsp + 0x44], 1
je 0x140036bff
cmp dword [rsp + 0x44], 2
jne 0x140036cf0
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 0x140036cf0
cmp eax, 0x104
ja 0x140036cf0
lea edi, [rax + 1]
mov ecx, edi
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140037718
mov qword [rsp + 0xb0], rax
cmp rax, r15
je 0x140036cf0
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, ebx
jne 0x140036cf0
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.140037718
mov rbx, rax
cmp rax, r15
je 0x140036cf0
mov rdx, qword [rsi + 0x10]
cmp rdx, r15
je 0x140036cc1
mov r8d, dword [rsi + 8]
shl r8, 6
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x10]
call sub.msvcrt.dll_free
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.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
jmp 0x140036d18
mov rax, qword [rsp + 0x98]
mov rcx, rax
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0xb0]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
inc ebp
cmp r13d, r15d
mov ebx, 4
lea edi, [rbx + 0x7c]
je 0x140036870
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.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.140037180
mov rcx, rsi
call fcn.14003708c
lea rbp, [0x140002fec]
cmp r12b, r15b
jne 0x140036de1
cmp qword [rsi + 0x90], r15
je 0x140036de1
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x68], rax
cmp rax, r15
jne 0x140036d8c
mov ecx, 0x8007000e
call fcn.14000f038
nop
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, r15
jne 0x140036dad
mov ecx, 0x8007000e
call fcn.14000f038
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 0x140036e65
cmp qword [rsi + 0x90], r15
je 0x140036e65
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x60], rax
cmp rax, r15
jne 0x140036e10
mov ecx, 0x8007000e
call fcn.14000f038
nop
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x68], rax
cmp rax, r15
jne 0x140036e31
mov ecx, 0x8007000e
call fcn.14000f038
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 [0x140049d3c], r15d
je 0x140036eb1
cmp byte [0x140049cf9], r15b
je 0x140036e88
mov al, byte [0x140049d40]
cmp al, 4
jae 0x140036e97
cmp al, r15b
jne 0x140036eb1
jmp 0x140036e97
mov al, byte [0x140049d40]
cmp al, 4
jae 0x140036e97
cmp al, r15b
jne 0x140036eb1
lea r8, [0x140002648]
lea rdx, [0x140002728]
mov rcx, qword [0x140049d10]
call fcn.14000e000
mov eax, dword [rsi + 8]
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.140037b50
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