Function at 0x140005d60
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov rax, qword [0x140113970]
xor rax, rsp
mov qword [rbp + 0x18], rax
mov rsi, rcx
xor r14d, r14d
mov qword [rbp - 0x18], r14
lea rax, [rbp - 0x18]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, qword [rcx + 0x38]
mov rcx, qword [rcx + 8]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x140006095
mov edi, 0x800
mov ecx, edi
call fcn.1400a5d68
mov rbx, rax
mov qword [rbp + 0x10], rax
mov dword [rbp - 0x40], edi
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x14000610e
lea rax, [rbp - 0x40]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
lea r15d, [r14 + 0x20]
mov r9d, r15d
mov r8, qword [rsi + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
nop dword [rax + rax]
mov edi, eax
or r12, 0xffffffffffffffff
cmp eax, 0xea
jne 0x140005ea6
mov ecx, dword [rbp - 0x40]
shr rcx, 1
lea eax, [r14 + 2]
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.1400a5d68
mov rdi, rax
mov rax, rbx
mov rcx, rbx
cmp rdi, rbx
je 0x140005e66
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
mov rbx, rdi
mov qword [rbp + 0x10], rbx
mov rax, rdi
mov rcx, rdi
test rcx, rcx
je 0x140005ef4
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x14000613f
lea rdx, [rbp - 0x40]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
mov r9d, r15d
mov r8, qword [rsi + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
nop dword [rax + rax]
mov edi, eax
test edi, edi
jne 0x140005f01
mov ecx, dword [rbp - 0x40]
shr ecx, 1
lea r15d, [rdi + 7]
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x28], r14
mov word [rbp - 0x38], r14w
lea r8d, [rcx - 1]
cmp ecx, 2
cmove r8d, r14d
mov rdx, rbx
lea rcx, [rbp - 0x38]
call fcn.14000643c
nop
mov rdx, qword [rsi + 0x28]
mov qword [rbp + 8], r15
mov qword [rbp], r14
mov word [rbp - 0x10], r14w
cmp word [rdx], r14w
jne 0x140005f24
mov r8, r14
jmp 0x140005f31
mov edx, dword [rbp - 0x40]
call fcn.140006d90
mov edi, 8
mov edx, edi
lea rcx, str.Unable_to_read_App_V_4.x_virtual_environment_override_entry.__error_code_0x_X_
call fcn.140006ce0
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
jmp 0x1400060a9
mov r8, r12
inc r8
cmp word [rdx + r8*2], r14w
jne 0x140005f27
lea rcx, [rbp - 0x10]
call fcn.14000643c
nop
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 8
cmovae rdx, qword [rbp - 0x10]
mov r9, qword [rbp]
xor r8d, r8d
lea rcx, [rbp - 0x38]
call fcn.140006350
cmp rax, r12
jne 0x14000604b
mov r9, r12
xor r8d, r8d
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x38]
call fcn.14000663c
lea rcx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x28]
lea rdx, [rcx + rax*2]
lea rax, [rbp - 0x38]
cmovae rax, qword [rbp - 0x38]
test rdx, rdx
jne 0x140005f9e
mov rdx, r14
jmp 0x140005fa4
sub rdx, rax
sar rdx, 1
xor r9d, r9d
lea edi, [r9 + 1]
mov r8d, edi
lea rcx, [rbp - 0x38]
call fcn.140006794
lea rcx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x28]
lea rdx, [rcx + rax*2]
lea rax, [rbp - 0x38]
cmovae rax, qword [rbp - 0x38]
test rdx, rdx
jne 0x140005fe0
mov rdx, r14
jmp 0x140005fe6
sub rdx, rax
sar rdx, 1
xor r9d, r9d
mov r8, rdi
lea rcx, [rbp - 0x38]
call fcn.140006794
mov eax, dword [rbp - 0x28]
lea edx, [rax + rax]
lea rax, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rax, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400060dd
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rax
mov r9d, r15d
xor r8d, r8d
mov rdx, qword [rsi + 0x20]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
je 0x140006051
mov edx, eax
lea rcx, str.Unable_to_add_an_entry_for_the_UE_V_agent_service_to_the_App_V_4.x_override_registry_key__error_code_0x_X_
call fcn.140006ce0
jmp 0x140006051
call fcn.140006e44
nop
cmp qword [rbp + 8], 8
jb 0x140006068
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
mov qword [rbp + 8], r15
mov qword [rbp], r14
mov word [rbp - 0x10], r14w
cmp qword [rbp - 0x20], 8
jb 0x140005f10
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
jmp 0x140005f10
cmp eax, 2
je 0x1400060a9
mov edx, eax
lea rcx, str.An_unexpected_error_occurred_opening_the_App_V_4.x_product_registry_key__error_code_0x_X_
call fcn.140006ce0
nop
lea rcx, [rbp - 0x18]
call fcn.14000619c
mov eax, edi
mov rcx, qword [rbp + 0x18]
xor rcx, rsp
call fcn.1400c4a70
lea r11, [rsp + 0x120]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x40]
call fcn.14000621c
nop
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x80]
call fcn.140005ab4
lea rdx, [0x1401096d0]
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 0x10]
call fcn.14000621c
nop
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140005ab4
lea rdx, [0x1401096d0]
lea rcx, [rsp + 0x40]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 0x10]
call fcn.14000621c
nop
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140005ab4
lea rdx, [0x1401096d0]
lea rcx, [rsp + 0x40]
call sub.msvcrt.dll__CxxThrowException
int3