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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0x258]
sub rsp, 0x330
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov rsi, rcx
xor r14d, r14d
mov qword [rbp - 8], r14
lea rax, [rbp - 8]
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]
mov edi, eax
test eax, eax
jne 0x140005918
mov ecx, 0x400
lea eax, [rdi + 2]
mul rcx
lea r12, [r14 - 1]
cmovo rax, r12
mov rcx, rax
call fcn.140097b58
mov rbx, rax
mov qword [rsp + 0x40], rax
mov dword [rbp - 0x30], 0x800
mov rcx, qword [rbp - 8]
test rcx, rcx
jne 0x1400055e3
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp]
call fcn.140005a2c
nop
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
mov r13d, 0x20
mov r9d, r13d
mov r8, qword [rsi + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov edi, eax
cmp eax, 0xea
jne 0x1400056f1
mov ecx, dword [rbp - 0x30]
shr rcx, 1
lea eax, [r13 - 0x1e]
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.140097b58
mov rdi, rax
cmp rax, rbx
je 0x14000564a
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
mov rbx, rdi
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x1400056af
mov rcx, qword [rbp - 8]
test rcx, rcx
jne 0x140005689
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp]
call fcn.140005a2c
nop
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
mov r9d, r13d
mov r8, qword [rsi + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov edi, eax
jmp 0x1400056f1
mov r9d, dword [rbp - 0x30]
lea r8, str.Unable_to_allocate__d_bytes_of_memory.
mov edx, 0x100
lea rcx, [rbp + 0x20]
call qword [sym.imp.msvcrt.dll_swprintf_s]
test dword [0x140124700], 0x200
je 0x1400056ec
lea r8, [rbp + 0x20]
lea rdx, [0x1400d0ad0]
mov rcx, qword [0x1401246c8]
call fcn.140002868
mov edi, 8
test edi, edi
jne 0x1400058fe
mov ecx, dword [rbp - 0x30]
shr ecx, 1
lea r13d, [rdi + 7]
mov qword [rbp - 0x10], r13
mov qword [rbp - 0x18], r14
mov word [rbp - 0x28], r14w
lea r8d, [rcx - 1]
cmp ecx, 2
cmove r8d, r14d
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.140005c18
nop
mov rdx, qword [rsi + 0x28]
mov qword [rbp + 0x18], r13
mov qword [rbp + 0x10], r14
mov word [rbp], r14w
cmp word [rdx], r14w
jne 0x140005743
mov r8, r14
jmp 0x140005750
mov r8, r12
inc r8
cmp word [rdx + r8*2], r14w
jne 0x140005746
lea rcx, [rbp]
call fcn.140005c18
nop
lea rdx, [rbp]
cmp qword [rbp + 0x18], 8
cmovae rdx, qword [rbp]
mov r9, qword [rbp + 0x10]
xor r8d, r8d
lea rcx, [rbp - 0x28]
call fcn.140005b14
cmp rax, r12
jne 0x140005890
mov r9, r12
xor r8d, r8d
lea rdx, [rbp]
lea rcx, [rbp - 0x28]
call fcn.140005e98
lea rcx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x18]
lea rdx, [rcx + rax*2]
lea rax, [rbp - 0x28]
cmovae rax, qword [rbp - 0x28]
test rdx, rdx
jne 0x1400057bd
mov rdx, r14
jmp 0x1400057c3
sub rdx, rax
sar rdx, 1
xor r9d, r9d
lea edi, [r9 + 1]
mov r8d, edi
lea rcx, [rbp - 0x28]
call fcn.140006034
lea rcx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x18]
lea rdx, [rcx + rax*2]
lea rax, [rbp - 0x28]
cmovae rax, qword [rbp - 0x28]
test rdx, rdx
jne 0x1400057ff
mov rdx, r14
jmp 0x140005805
sub rdx, rax
sar rdx, 1
xor r9d, r9d
mov r8, rdi
lea rcx, [rbp - 0x28]
call fcn.140006034
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 8]
test rcx, rcx
jne 0x14000585c
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x50]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
mov eax, dword [rbp - 0x18]
add eax, eax
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
mov r9d, r13d
xor r8d, r8d
mov rdx, qword [rsi + 0x20]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
je 0x1400058cd
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.140006568
jmp 0x1400058cd
xor r9d, r9d
lea r8, str.UE_V_override_entry_is_already_present.
mov edx, 0x100
lea rcx, [rbp + 0x20]
call qword [sym.imp.msvcrt.dll_swprintf_s]
test dword [0x140124700], 0x200
je 0x1400058cd
lea r8, [rbp + 0x20]
lea rdx, [0x1400d0ad0]
mov rcx, qword [0x1401246c8]
call fcn.140002868
nop
cmp qword [rbp + 0x18], 8
jb 0x1400058de
mov rcx, qword [rbp]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x18], r13
mov qword [rbp + 0x10], r14
mov word [rbp], r14w
cmp qword [rbp - 0x10], 8
jb 0x14000590d
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
jmp 0x14000590d
mov edx, edi
lea rcx, str.Unable_to_read_App_V_4.x_virtual_environment_override_entry.__error_code_0x_X_
call fcn.140006568
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
jmp 0x14000592c
cmp eax, 2
je 0x14000592c
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.140006568
nop
lea rcx, [rbp - 8]
call fcn.140005984
mov eax, edi
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.1400b3bf0
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret