Function at 0x14009a120
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov rax, qword [0x14049f3c0]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov rbx, r8
mov rdi, rdx
mov r15, rcx
xor r14b, r14b
call fcn.140099d00
xor r12d, r12d
mov qword [rbp - 0x19], r12
mov qword [rbp - 9], r12
mov qword [rbp - 0x11], r12
mov rdx, rdi
cmp qword [rdi + 0x18], 7
jbe 0x14009a172
mov rdx, qword [rdi]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r9d, 0x2021f
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp eax, 2
jne 0x14009a1c6
cmp qword [rdi + 0x18], 7
jbe 0x14009a1a2
mov rdi, qword [rdi]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r9d, 0x2011f
xor r8d, r8d
mov rdx, rdi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x14009a400
mov qword [rsp + 0x40], r12
lea rax, [rbp - 9]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.NativeMessagingHosts
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jne 0x14009a3b0
mov qword [rsp + 0x40], r12
lea rax, [rbp - 0x11]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.mbambgnativemsg.exe
mov rcx, qword [rbp - 9]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jne 0x14009a353
cmp qword [rbx + 0x18], 7
jbe 0x14009a25a
mov rbx, qword [rbx]
xorps xmm0, xmm0
movups xmmword [rbp - 0x39], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x29], xmm1
mov r8, 0xffffffffffffffff
inc r8
cmp word [rbx + r8*2], r12w
jne 0x14009a270
mov rdx, rbx
lea rcx, [rbp - 0x39]
call fcn.140031e00
nop
lea r8, [rbp - 0x39]
mov rdx, r15
lea rcx, [rbp - 1]
call fcn.1400a2f80
nop
lea rcx, [rbp - 0x39]
call fcn.1400166f0
mov eax, dword [rbp + 0xf]
lea eax, [rax*2 + 2]
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 7
cmova rcx, qword [rbp - 1]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jne 0x14009a2e2
mov r14b, 1
jmp 0x14009a326
lea rdx, str.:_RegSetValueEx_Error
lea rcx, [0x1404b5d00]
call fcn.140034a00
mov edx, ebx
mov rcx, rax
call fcn.140047c40
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140035dd0
movzx edx, al
mov rcx, rbx
call fcn.140035860
mov rcx, rbx
call fcn.14002eff0
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rbp - 1]
call fcn.1400166f0
mov rcx, qword [rbp - 9]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14009a449
lea rdx, str.:_RegCreateKeyEx_2__Error
lea rcx, [0x1404b5d00]
call fcn.140034a00
mov edx, edi
mov rcx, rax
call fcn.140047c40
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140035dd0
movzx edx, al
mov rcx, rbx
call fcn.140035860
mov rcx, rbx
call fcn.14002eff0
mov rcx, qword [rbp - 9]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14009a449
lea rdx, str.:_RegCreateKeyEx_1__Error
lea rcx, [0x1404b5d00]
call fcn.140034a00
mov edx, edi
mov rcx, rax
call fcn.140047c40
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140035dd0
movzx edx, al
mov rcx, rbx
call fcn.140035860
mov rcx, rbx
call fcn.14002eff0
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14009a449
cmp esi, 2
je 0x14009a449
lea rdx, str.:_RegOpenKeyEx_Error
lea rcx, [0x1404b5d00]
call fcn.140034a00
mov edx, esi
mov rcx, rax
call fcn.140047c40
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140035dd0
movzx edx, al
mov rcx, rbx
call fcn.140035860
mov rcx, rbx
call fcn.14002eff0
movzx eax, r14b
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1402ba9b0
add rsp, 0xb0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret