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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xf8]
sub rsp, 0x1c0
mov qword [rbp], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x14007c010]
xor rax, rsp
mov qword [rbp + 0xb8], rax
mov qword [rsp + 0x68], rdx
mov rsi, rcx
xor r13d, r13d
mov dword [rsp + 0x40], r13d
mov eax, dword [0x14007e700]
test eax, eax
je 0x140017f0b
cmp eax, 2
sete al
jmp 0x140017f15
cmp byte [0x14007e760], r13b
setne al
test al, al
jne 0x14001867b
cmp dword [0x14007e998], r13d
jne 0x14001867b
mov dl, 1
call fcn.140018bdc
test al, al
jne 0x14001867b
mov rbx, r13
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x50], r13d
lea rcx, [0x14007eb38]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 1
lock xadd dword [rsp + 0x60], eax
test eax, eax
jne 0x140017f81
cmp dword [rsp + 0x64], r13d
jne 0x1400186c9
call qword [sym.imp.MSVCP140.dll__Thrd_id]
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x48], r13
mov r14d, r13d
mov edi, dword [rsp + 0x40]
lea r12, [0x140000000]
cmp r14d, 4
jge 0x1400180e2
mov r15b, r13b
mov eax, dword [rsi + 0x1c]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov rdx, qword [rsi + 0x10]
lea rcx, [rbp - 0x60]
call fcn.140017150
mov ecx, dword [rax]
mov dword [rsp + 0x40], ecx
mov rdx, qword [rax + 8]
mov qword [rax + 8], r13
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x48], rdx
test rcx, rcx
je 0x140017fe3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x140017ffe
mov qword [rbp - 0x58], r13
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
mov edi, dword [rsp + 0x40]
test edi, edi
jne 0x1400180d6
mov rax, qword [rsp + 0x48]
lea rcx, [rsp + 0x44]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, qword [rsi]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x14001809e
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400180d6
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1400183a6
test rbx, rbx
je 0x14001806c
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rbx, rdi
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, qword [rsi]
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov dword [rsp + 0x40], eax
cmp edi, 0x3f2
je 0x1400180b3
cmp edi, 0x3fa
je 0x1400180b3
cmp edi, 6
jne 0x1400180d6
mov rcx, qword [rsi + 0x10]
movzx eax, word [rcx + 0xa]
and eax, 0x1f
shl rax, 5
mov qword [rax + r12 + 0x7c190], r13
call fcn.140015914
mov r15b, 1
mov edi, dword [rsp + 0x40]
inc r14d
test r15b, r15b
jne 0x140017f94
test edi, edi
mov r12, qword [rsp + 0x68]
jne 0x140018410
test rbx, rbx
je 0x140018410
movzx eax, word [rsi + 0x18]
and eax, 0xf
cmp dword [rsp + 0x50], eax
jne 0x140018144
dec eax
cmp eax, 1
ja 0x1400183b4
mov eax, dword [rsp + 0x44]
shr rax, 1
cmp word [rbx + rax*2 - 2], r13w
jne 0x140018144
mov rax, rbx
mov r8, r12
sub r8, rbx
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x14001813c
add rax, 2
test edx, edx
jne 0x140018128
test ecx, ecx
je 0x1400183d3
mov r14d, r13d
cmp r14d, 4
jge 0x1400183d3
mov r15b, r13b
mov eax, dword [rsi + 0x1c]
mov dword [rsp + 0x20], eax
mov r9d, 4
mov rdx, qword [rsi + 0x10]
lea rcx, [rbp - 0x50]
call fcn.140017150
mov ecx, dword [rax]
mov dword [rsp + 0x40], ecx
mov rdx, qword [rax + 8]
mov qword [rax + 8], r13
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x48], rdx
test rcx, rcx
je 0x140018199
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x1400181b4
mov qword [rbp - 0x48], r13
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x140018489
movzx r9d, word [rsi + 0x18]
and r9d, 0xf
mov rax, qword [rsp + 0x48]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov rdx, qword [rsi]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov dword [rsp + 0x40], eax
cmp eax, 0x3f2
je 0x14001845e
cmp eax, 0x3fa
je 0x14001845e
cmp eax, 6
je 0x14001845e
test eax, eax
je 0x14001864e
lea rax, [0x1400448e8]
mov qword [rsp + 0x70], rax
lea rax, str.Win32ErrorCode
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], edi
mov word [rbp - 0x7c], r13w
lea rax, vtable.Mso::Logging::StructuredObject_wchar_t_const____ptr64__1_.0
mov qword [rbp - 0x40], rax
lea rax, str.RegistryValueName
mov qword [rbp - 0x38], rax
mov rax, qword [rsi]
mov qword [rbp - 0x30], rax
mov word [rbp - 0x28], r13w
mov r8b, r13b
mov rdx, qword [rsi + 0x10]
lea rcx, [rbp + 8]
call fcn.1400161c8
lea rax, [0x1400448c8]
mov qword [rbp + 0x48], rax
lea rax, str.KeyPath
mov qword [rbp + 0x50], rax
movups xmm0, xmmword [rbp + 8]
movups xmmword [rbp + 0x58], xmm0
movups xmm1, xmmword [rbp + 0x18]
movups xmmword [rbp + 0x68], xmm1
mov qword [rbp + 0x18], r13
mov edi, 7
mov qword [rbp + 0x20], rdi
mov word [rbp + 8], r13w
mov word [rbp + 0x78], r13w
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_write_registry_value.
mov qword [rsp + 0x20], rax
mov ecx, 0x16928cc
call fcn.140019a54
mov rax, qword [rbp + 0x70]
cmp rax, 8
jb 0x140018316
mov rcx, qword [rbp + 0x58]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, 0x1000
jb 0x14001830f
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x14001865f
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0x68], r13
mov qword [rbp + 0x70], rdi
mov word [rbp + 0x58], r13w
mov rax, qword [rbp + 0x20]
cmp rax, 8
jb 0x140018360
mov rcx, qword [rbp + 8]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, 0x1000
jb 0x140018359
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140018666
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov r8d, dword [rsp + 0x40]
mov ecx, 1
lock xadd dword [0x14007e3dc], ecx
inc ecx
movabs rax, 0x47ae147ae147ae15
mul rcx
mov eax, ecx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x32
sub rcx, rax
movsxd rax, ecx
lea rcx, str.OrapiWriteFail:_RegSetValueExW
jmp 0x140018630
mov edi, 8
mov dword [rsp + 0x40], edi
jmp 0x1400180d6
cmp dword [rsp + 0x44], 4
jne 0x140018144
mov eax, dword [rbx]
cmp eax, dword [r12]
jne 0x140018144
mov edi, r13d
mov dword [rsp + 0x40], r13d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400183f0
mov qword [rsp + 0x48], r13
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
lea rcx, [rsp + 0x58]
call fcn.1400105e8
test rbx, rbx
je 0x140018409
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov eax, edi
jmp 0x14001867d
movabs rax, 0xcccccccccccccccc
cmp qword [rsi + 8], rax
je 0x140018144
movzx eax, word [rsi + 0x18]
and eax, 0xf
jbe 0x1400186b9
cmp eax, 2
jbe 0x140018455
cmp eax, 4
je 0x140018449
cmp eax, 0xb
jne 0x1400186b9
jmp 0x1400186a7
mov eax, dword [rsi + 8]
cmp dword [r12], eax
jmp 0x1400183c5
cmp qword [rsi + 8], r12
jmp 0x1400183c5
mov rcx, qword [rsi + 0x10]
movzx eax, word [rcx + 0xa]
and eax, 0x1f
shl rax, 5
lea rdx, [0x140000000]
mov qword [rax + rdx + 0x7c190], r13
call fcn.140015914
mov r15b, 1
jmp 0x14001864a
lea rcx, [0x1400448e8]
mov qword [rbp - 0x78], rcx
lea rcx, str.Win32ErrorCode
mov qword [rbp - 0x70], rcx
mov dword [rbp - 0x68], eax
mov word [rbp - 0x64], r13w
lea rax, vtable.Mso::Logging::StructuredObject_wchar_t_const____ptr64__1_.0
mov qword [rbp - 0x20], rax
lea rax, str.RegistryValueName
mov qword [rbp - 0x18], rax
mov rax, qword [rsi]
mov qword [rbp - 0x10], rax
mov word [rbp - 8], r13w
mov rdx, qword [rsi + 0x10]
mov rdx, qword [rdx]
lea rcx, [rbp + 0x28]
call fcn.14000c624
lea rax, [0x1400448c8]
mov qword [rbp + 0x80], rax
lea rax, str.KeyName
mov qword [rbp + 0x88], rax
movups xmm0, xmmword [rbp + 0x28]
movups xmmword [rbp + 0x90], xmm0
movups xmm1, xmmword [rbp + 0x38]
movups xmmword [rbp + 0xa0], xmm1
mov qword [rbp + 0x38], r13
mov edi, 7
mov qword [rbp + 0x40], rdi
mov word [rbp + 0x28], r13w
mov word [rbp + 0xb0], r13w
lea rax, [rbp - 0x78]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x80]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_open_registry_key.
mov qword [rsp + 0x20], rax
mov ecx, 0x16928cd
call fcn.140019a54
mov rax, qword [rbp + 0xa8]
cmp rax, 8
jb 0x14001859c
mov rcx, qword [rbp + 0x90]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, 0x1000
jb 0x140018595
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x14001866d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0xa0], r13
mov qword [rbp + 0xa8], rdi
mov word [rbp + 0x90], r13w
mov rax, qword [rbp + 0x40]
cmp rax, 8
jb 0x1400185ef
mov rcx, qword [rbp + 0x28]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, 0x1000
jb 0x1400185e8
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140018674
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov r8d, dword [rsp + 0x40]
mov ecx, 1
lock xadd dword [0x14007e3dc], ecx
inc ecx
movabs rax, 0x47ae147ae147ae15
mul rcx
mov eax, ecx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x32
sub rcx, rax
movsxd rax, ecx
lea rcx, str.OrapiWriteFail:_TryOpenKey_in_WriteValue
lea r9, [0x140000000]
add rax, rax
mov qword [r9 + rax*8 + 0x7e3e8], rcx
mov dword [r9 + rax*8 + 0x7e3e0], r8d
mov edi, dword [rsp + 0x40]
inc r14d
test r15b, r15b
je 0x1400183d3
jmp 0x140018147
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor eax, eax
mov rcx, qword [rbp + 0xb8]
xor rcx, rsp
call fcn.14003ee60
mov rbx, qword [rsp + 0x210]
add rsp, 0x1c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor edx, edx
mov ecx, 0x59948f
call fcn.140015658
nop
jmp 0x1400186b8
nop
xor edx, edx
mov ecx, 0x599491
call fcn.140015658
nop
jmp 0x1400186c8
nop
xor edx, edx
mov ecx, 0x131f4c4
call fcn.140015658
nop
jmp 0x1400186d8
nop
nop
nop
nop
nop
nop
nop
nop