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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0xbb0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xbe0], rbx
mov rax, qword [0x140048200]
xor rax, rsp
mov qword [rsp + 0xba0], rax
mov r12, r8
mov rbx, rdx
mov rbp, rcx
call fcn.1400095b4
mov rcx, rax
xor r13d, r13d
mov edx, r13d
test rax, rax
setne dl
test edx, edx
jne 0x14000576e
mov ecx, 0x80004005
call fcn.140002350
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x40], rdi
or rsi, 0xffffffffffffffff
test rbx, rbx
je 0x1400057c8
test rbx, 0xffffffffffff0000
jne 0x1400057b5
movzx ebx, bx
mov ecx, ebx
call fcn.140009c88
test rax, rax
je 0x1400057e0
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001e90
mov rdi, qword [rsp + 0x40]
jmp 0x1400057e0
xor eax, eax
mov rcx, rsi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x1400057cb
mov ecx, r13d
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.1400021a0
mov rdi, qword [rsp + 0x40]
mov word [rsp + 0x60], r13w
cmp dword [rdi - 0x10], 0
jne 0x14000580b
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140005804
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140005ca2
lea rdx, str.CLSID
lea rcx, [rsp + 0x40]
call fcn.1400083b0
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rdx
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 0x1400058a7
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 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 0x14000589c
cmp dword [rsp + 0x34], 1
jne 0x14000589c
lea r8, [rsp + 0x260]
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x60]
call fcn.14001fcb0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x60]
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
jne 0x1400058dc
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400058d5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140005ca2
lea r8, str.CLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.14001fcb0
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.14001fe84
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x160]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400059b3
lea r8, str.Wow6432NodeCLSID_
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.14001fcb0
lea r8, [rsp + 0x60]
mov edx, 0x80
lea rcx, [rsp + 0x160]
call fcn.14001fe84
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x160]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400059b3
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400059ac
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140005ca2
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 0x140005a78
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 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 0x140005a68
cmp dword [rsp + 0x34], 1
jne 0x140005a68
mov r9, r12
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x260]
mov rcx, rbp
call fcn.140004d00
mov edi, eax
test eax, eax
jle 0x140005a68
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140005a61
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140005ca2
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140005c88
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 0x140005b81
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x360]
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 0x140005b76
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140005b2d
cmp eax, 2
jne 0x140005b76
mov r8d, 0x104
lea rdx, [rsp + 0x780]
lea rcx, [rsp + 0x360]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140005b2d
lea r8, [rsp + 0x780]
mov edx, 0x104
lea rcx, [rsp + 0x360]
call fcn.14001fcb0
mov r9, r12
lea r8, [rsp + 0x360]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.140005380
mov edi, eax
test eax, eax
jle 0x140005b76
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140005b6f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140005ca2
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 0x140005c88
mov dword [rsp + 0x30], 0x105
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x570]
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 0x140005c7c
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140005c36
cmp eax, 2
jne 0x140005c7c
mov r8d, 0x104
lea rdx, [rsp + 0x990]
lea rcx, [rsp + 0x570]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140005c36
lea r8, [rsp + 0x990]
mov edx, 0x104
lea rcx, [rsp + 0x570]
call fcn.14001fcb0
mov r9, r12
lea r8, [rsp + 0x570]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.140005380
mov edi, eax
test eax, eax
jle 0x140005c7c
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140005c78
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
jmp 0x140005ca2
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140005ca0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rsp + 0xba0]
xor rcx, rsp
call fcn.14001eee0
mov rbx, qword [rsp + 0xbe0]
add rsp, 0xbb0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret