Function at 0x140005a70
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
sub rsp, 0x5d0
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [rsp + 0x610], rbx
mov rax, qword [0x14004b200]
xor rax, rsp
mov qword [rsp + 0x5c0], rax
mov r15, r9
mov r14, r8
mov rsi, rdx
mov r13, rcx
xor ebx, ebx
mov word [rsp + 0x1a0], bx
call fcn.14000bb5c
mov rcx, rax
mov edx, ebx
test rax, rax
setne dl
test edx, edx
jne 0x140005ade
mov ecx, 0x80004005
call fcn.140002330
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x40], rdi
lea rax, str.TypeLib_
mov ebp, 1
or r12, 0xffffffffffffffff
test rax, 0xffffffffffff0000
jne 0x140005b2d
movzx edi, ax
mov ecx, edi
call fcn.14000c1b8
test rax, rax
je 0x140005c06
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001e70
jmp 0x140005c06
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
mov r9d, r12d
mov r8, rax
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebx, [rax - 1]
test ebx, ebx
jle 0x140005ba9
mov edx, ebp
sub edx, dword [rdi - 8]
mov ecx, dword [rdi - 0xc]
sub ecx, ebx
or ecx, edx
jge 0x140005b6d
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.140002120
mov rdi, qword [rsp + 0x40]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
mov r9d, r12d
lea r8, str.TypeLib_
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp ebx, dword [rdi - 0xc]
jg 0x140005b9e
mov dword [rdi - 0x10], ebx
movsxd rax, ebx
xor ebx, ebx
mov word [rdi + rax*2], bx
jmp 0x140005c06
mov ecx, 0x80070057
call fcn.140002330
int3
lea rdx, [rdi - 0x18]
mov rbx, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140005c04
cmp dword [rdx + 0x10], 0
jge 0x140005bd7
cmp dword [rdi - 0xc], 0
jge 0x140005bcd
mov ecx, 0x80070057
call fcn.140002330
int3
xor ebx, ebx
mov dword [rdi - 0x10], ebx
mov word [rdi], bx
jmp 0x140005c06
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140005bee
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
xor ebx, ebx
jmp 0x140005c06
xor ebx, ebx
test rsi, rsi
jne 0x140005c0f
mov ecx, ebx
jmp 0x140005c20
xor eax, eax
mov rcx, r12
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.140002910
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
mov rdi, qword [rsp + 0x40]
mov rdx, rdi
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140005daf
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
mov r9d, r12d
lea r8, str.Wow6432NodeTypeLib_
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebx, [rax - 1]
test ebx, ebx
jle 0x140005cde
sub ebp, dword [rdi - 8]
mov edx, dword [rdi - 0xc]
sub edx, ebx
or edx, ebp
jge 0x140005ca2
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.140002120
mov rdi, qword [rsp + 0x40]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
mov r9d, r12d
lea r8, str.Wow6432NodeTypeLib_
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp ebx, dword [rdi - 0xc]
jg 0x140005cd3
mov dword [rdi - 0x10], ebx
movsxd rax, ebx
xor ecx, ecx
mov word [rdi + rax*2], cx
jmp 0x140005d3b
mov ecx, 0x80070057
call fcn.140002330
int3
lea rdx, [rdi - 0x18]
mov rbx, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140005d39
cmp dword [rdx + 0x10], 0
jge 0x140005d0c
cmp dword [rdi - 0xc], 0
jge 0x140005d02
mov ecx, 0x80070057
call fcn.140002330
int3
xor ecx, ecx
mov dword [rdi - 0x10], ecx
mov word [rdi], cx
jmp 0x140005d3b
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140005d23
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
xor ecx, ecx
jmp 0x140005d3b
xor ecx, ecx
test rsi, rsi
je 0x140005d51
xor eax, eax
mov rcx, r12
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.140002910
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
mov rdi, qword [rsp + 0x40]
mov rdx, rdi
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140005daf
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x140005da8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x1400060bc
mov dword [rsp + 0x50], 0x80
mov dword [rsp + 0x48], 0x40
xor ebx, ebx
mov ebp, ebx
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x120]
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140006093
nop word [rax + rax]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x120]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000601f
mov dword [rsp + 0x4c], 0x40
mov esi, ebx
lea rax, [rsp + 0x88]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0xa0]
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140006014
nop word [rax + rax]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140005fcc
lea rax, [rsp + 0x60]
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 0x140005f14
lea rax, [rsp + 0x60]
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 0x140005fc1
mov dword [rsp + 0x50], 0x105
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140005fb6
mov eax, dword [rsp + 0x70]
cmp eax, 1
je 0x140005f94
cmp eax, 2
jne 0x140005fb6
mov r8d, 0x104
lea rdx, [rsp + 0x3b0]
lea rcx, [rsp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140005f94
lea r8, [rsp + 0x3b0]
mov edx, 0x104
lea rcx, [rsp + 0x1a0]
call fcn.140022260
mov r9, r15
lea r8, [rsp + 0x1a0]
mov rdx, r14
mov rcx, r13
call fcn.1400060f0
mov ebx, eax
test eax, eax
jg 0x140006068
xor ebx, ebx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
mov dword [rsp + 0x4c], 0x40
lea rax, [rsp + 0x88]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0xa0]
mov edx, esi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x140005e90
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebp
mov dword [rsp + 0x48], 0x40
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x120]
mov edx, ebp
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140006093
jmp 0x140005e10
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x14000608f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, ebx
jmp 0x1400060bc
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x1400060ba
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rsp + 0x5c0]
xor rcx, rsp
call fcn.1400214b0
mov rbx, qword [rsp + 0x610]
add rsp, 0x5d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret