Function at 0x140002540
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x4f]
sub rsp, 0xd0
mov qword [rbp + 7], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rsi, r9
mov rdi, r8
mov rbx, rcx
lea rdx, str._DrsProfile__successfully_set._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
xor r12d, r12d
mov qword [rbp - 0x39], r12
mov r14d, r12d
mov r15d, r12d
mov dword [rbp - 0x29], r12d
mov dword [rbp - 0x49], r12d
mov dword [rbp - 0x2d], r12d
mov dword [rbp - 0x31], r12d
mov dword [rbp - 0x55], r12d
mov dword [rbp - 0x4d], r12d
mov dword [rbp - 0x51], r12d
mov r8, rbx
lea rdx, str.Opening_the_reg_path___s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
mov rdx, rbx
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002b43
mov r8, rbx
lea rdx, str.Querying_for_reg_values_under___s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r12
lea rax, [rbp - 0x51]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x4d]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x49]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x140002666
lea rdx, str.WARNING:_Failed_to_query_reg_values_under___s__err:_d___n
jmp 0x140002b70
mov eax, dword [rbp - 0x4d]
inc eax
mov dword [rbp - 0x4d], eax
mov ecx, eax
inc dword [rbp - 0x51]
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14002795c
mov r14, rax
mov ecx, dword [rbp - 0x51]
call fcn.14002795c
mov r15, rax
mov r13d, r12d
cmp dword [rbp - 0x49], r12d
jbe 0x140002b85
xor ebx, ebx
nop dword [rax + rax]
mov ecx, dword [rbp - 0x4d]
mov dword [rbp - 0x31], ecx
mov eax, dword [rbp - 0x51]
mov dword [rbp - 0x55], eax
mov r8d, ecx
add r8, r8
xor edx, edx
mov rcx, r14
call fcn.14002a010
mov r8d, dword [rbp - 0x55]
xor edx, edx
mov rcx, r15
call fcn.14002a010
lea rax, [rbp - 0x55]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
lea rax, [rbp - 0x2d]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x31]
mov r8, r14
mov edx, r13d
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov r8, r14
lea rdx, str.Queried_value______s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov r12, qword [rbp + 0x7f]
lea rdx, str.DRS_Enabled
mov rcx, r14
call fcn.14003559c
test eax, eax
je 0x140002b30
lea rdx, str.DRS_DefaultProfile
mov rcx, r14
call fcn.14003559c
test eax, eax
jne 0x1400027ad
mov rdx, r15
lea rcx, [rbp - 0x19]
call fcn.140026c90
nop
lea rdx, [rbp - 0x19]
mov rcx, rsi
call fcn.140022bb0
mov r8, qword [rbp - 0x19]
mov rcx, qword [0x1400a7228]
cmp eax, 1
jbe 0x140002785
lea rdx, str.WARNING:_Could_not_set_Global_Profile_to______s___n
call fcn.1400040a0
jmp 0x14000279e
lea rdx, str.Successfully_set_Global_Profile_to______s__n
call fcn.1400040a0
lea rdx, [rbp - 0x19]
mov rcx, rsi
call fcn.140022c20
nop
lea rcx, [rbp - 0x19]
call fcn.1400275a0
nop
jmp 0x140002b30
lea rdx, str.DeviceDesc
mov rcx, r14
call fcn.14003559c
test eax, eax
je 0x140002b30
lea rdx, str.DeviceID
mov rcx, r14
call fcn.14003559c
test eax, eax
je 0x140002b30
mov r8d, 4
lea rdx, str.DRS_
mov rcx, r14
call fcn.140035734
test eax, eax
jne 0x140002b1a
mov qword [rbp - 0x41], rbx
lea edx, [rax + 0x7b]
mov rcx, r14
call fcn.1400295bc
mov rbx, rax
test rax, rax
je 0x1400028b9
xor eax, eax
mov word [rbx], ax
add rbx, 2
lea edx, [rax + 0x7d]
mov rcx, rbx
call fcn.1400295bc
mov rsi, rax
test rax, rax
je 0x14000289f
lea rcx, [rbp - 9]
call fcn.140026d40
nop
xor eax, eax
mov qword [rbp - 0x21], rax
mov word [rsi], ax
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.140026ef0
lea r8, [rbp - 0x21]
lea rdx, [rbp - 9]
mov rsi, qword [rbp + 0x6f]
mov rcx, rsi
call fcn.14001d3d0
cmp eax, 1
jbe 0x14000288f
mov r8, rbx
lea rdx, str.WARNING:_Could_not_find_Profile_With_Name__s_on_the_databse..._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
nop
lea rcx, [rbp - 9]
call fcn.1400275a0
nop
xor ebx, ebx
jmp 0x140002b30
mov r12, qword [rbp - 0x21]
lea rcx, [rbp - 9]
call fcn.1400275a0
nop
jmp 0x1400028b9
mov r8, rbx
lea rdx, str.WARNING:_Could_not_parse_Profile_Name__s__continuing..._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rsi, qword [rbp + 0x6f]
lea rcx, [r14 + 8]
lea r8, [rbp - 0x59]
lea rdx, [0x140087af4]
call fcn.140003460
cmp eax, 1
jne 0x140002b00
lea r8, [rbp - 0x41]
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.14001da20
mov rcx, qword [rbp - 0x41]
cmp eax, 0xa
mov ebx, 0
cmove rcx, rbx
mov qword [rbp - 0x41], rcx
mov eax, dword [rbp - 0x2d]
sub eax, 1
je 0x140002a3f
sub eax, 2
je 0x1400029e7
sub eax, 1
je 0x140002992
sub eax, 3
je 0x1400029e7
cmp eax, 4
je 0x14000293c
mov r8, r14
lea rdx, str.Registry_key_not_used__type_unsupported:__s_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x140002aa1
test rcx, rcx
jne 0x140002974
mov byte [rsp + 0x28], 1
mov rax, qword [r15]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.14001a080
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_create_new_QWORD_driver_setting_with_Id__d__n
jmp 0x140002a91
mov rax, qword [rcx]
mov rdx, qword [r15]
call qword [rax + 0x18]
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_re_define_QWORD_driver_setting_with_Id__d__n
jmp 0x140002a91
test rcx, rcx
jne 0x1400029c9
mov byte [rsp + 0x28], 1
mov eax, dword [r15]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.140019ef0
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_create_new_DWORD_driver_setting_with_Id__d__n
jmp 0x140002a91
mov rax, qword [rcx]
mov edx, dword [r15]
call qword [rax + 0x20]
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_re_define_DWORD_driver_setting_with_Id__d__n
jmp 0x140002a91
test rcx, rcx
jne 0x140002a24
mov byte [rsp + 0x38], 1
mov eax, dword [rbp - 0x55]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r15
mov byte [rsp + 0x20], bl
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.140019d00
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_create_new_BINARY_driver_setting_with_Id__d__n
jmp 0x140002a91
mov rax, qword [rcx]
mov r8d, dword [rbp - 0x55]
mov rdx, r15
call qword [rax + 0x50]
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_re_define_BINARY_driver_setting_with_Id__d__n
jmp 0x140002a91
test rcx, rcx
jne 0x140002a78
mov byte [rsp + 0x38], 1
mov eax, dword [rbp - 0x55]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r15
mov byte [rsp + 0x20], bl
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.14001a400
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_create_new_STRING_driver_setting_with_Id__d__n
jmp 0x140002a91
mov rax, qword [rcx]
mov r8d, dword [rbp - 0x55]
mov rdx, r15
call qword [rax + 0x40]
cmp eax, 1
jbe 0x140002aa3
lea rdx, str.WARNING:_Could_not_re_define_STRING_driver_setting_with_Id__d__n
mov r8d, dword [rbp - 0x59]
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov dword [rdi], ebx
mov rax, qword [rbp - 0x41]
test rax, rax
jne 0x140002ade
lea r8, [rbp - 0x41]
mov edx, dword [rbp - 0x59]
mov rcx, r12
call fcn.14001da20
cmp eax, 1
jbe 0x140002ad5
lea rdx, str.WARNING:_Could_not_retrieve_the_setting_after_adding_it__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov dword [rdi], ebx
mov rax, qword [rbp - 0x41]
test rax, rax
je 0x140002b30
cmp byte [rax + 0xd], bl
je 0x140002ae9
mov byte [rax + 0xf], 1
jmp 0x140002b30
lea rdx, str.WARNING:_Could_not_set_the_INF_customization_flag_for_a_setting__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov dword [rdi], ebx
jmp 0x140002b30
mov r8, r14
lea rdx, str.WARNING:_Registry_key_not_used__could_not_convert_the_hexadecimal_value:__s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
xor ebx, ebx
jmp 0x140002b30
mov r8, r14
lea rdx, str.Registry_key_not_used__name_not_understood:__s_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
inc r13d
cmp r13d, dword [rbp - 0x49]
jb 0x1400026b0
mov rbx, qword [rbp + 0x57]
jmp 0x140002b85
cmp eax, 2
jne 0x140002b69
mov r9d, eax
mov r8, rbx
lea rdx, str.__s__does_not_exist._No_OEM_Customization_work_will_be_done_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov dword [rdi], 5
jmp 0x140002b85
lea rdx, str.Failed_to_open_reg_path___s___err:_d__n
mov r9d, eax
mov r8, rbx
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov dword [rdi], r12d
mov r8, rbx
lea rdx, str.Deleting_registry___s__if_any_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
mov r9d, 0x102
xor r8d, r8d
mov rdx, qword [rbp + 0x5f]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002bf9
lea rdx, [0x1400882a0]
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, 0xfffffffd
je 0x140002bf9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, rbx
lea rdx, str.WARNING:_Failed_to_delete__s__err:_d___n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, r14
call fcn.140027964
mov rcx, r15
call fcn.140027964
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret