Function at 0x1401211e0
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x318]
sub rsp, 0x418
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov rax, qword [0x1402f2080]
xor rax, rsp
mov qword [rbp + 0x300], rax
mov r12, r9
mov r15d, r8d
mov r14, rdx
mov rsi, rcx
xor dil, dil
xor eax, eax
mov qword [rbp + 0xd8], rax
mov rax, qword [rcx + 0x470]
mov qword [rsp + 0x60], rax
mov dword [rbp + 0xd8], 0xffffffff
mov qword [rbp + 0xe0], rax
test rax, rax
je 0x140121264
mov edx, 0xbb8
mov rcx, rax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov dword [rbp + 0xd8], eax
mov eax, dword [rbp + 0x380]
cmp eax, 1
jne 0x140121280
lea r13, [rsi + 0x140]
mov qword [rsp + 0x50], r13
movzx edi, al
jmp 0x1401212b8
mov ecx, 0x108
call fcn.1401467ec
mov rbx, rax
mov qword [rsp + 0x58], rax
xor edx, edx
mov r8d, 0x108
mov rcx, rax
call fcn.1401659c0
mov rcx, rbx
call fcn.140112630
mov r13, rax
mov qword [rsp + 0x50], rax
mov eax, dword [rbp + 0x380]
test r13, r13
je 0x14012144b
cmp eax, 1
je 0x14012144b
mov dword [rsp + 0x20], 1
xor r9d, r9d
mov r8d, r15d
mov rdx, r14
mov rcx, r13
call fcn.140112e50
test al, al
jne 0x140121303
mov r9d, 1
mov r8d, r15d
mov rdx, r14
mov rcx, r13
call fcn.140113710
test al, al
je 0x14012144b
xor eax, eax
mov qword [rbp + 0xc0], rax
lea rbx, vtable.CMaxxAudioRegistryPreset.0
mov qword [rbp + 0xb8], rbx
xor edx, edx
mov qword [rbp + 0xc8], rdx
mov ecx, dword [rsi + 0xec]
mov eax, ecx
and eax, 2
test al, al
je 0x140121339
mov eax, 0x200
jmp 0x140121346
test cl, 4
mov eax, edx
mov ecx, 0x100
cmovne eax, ecx
mov qword [rbp + 0xc0], rdx
or eax, 0x20017
mov qword [rsp + 0x40], rdx
lea rcx, [rbp + 0xc0]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], edx
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x110]
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x140121432
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xf0]
call fcn.1401659c0
lea r8, str.DefaultPreset
mov edx, 0x104
lea rcx, [rbp + 0xf0]
call fcn.14017d450
lea rax, [rsp + 0x78]
mov qword [rsp + 0x70], rax
mov r8d, 3
mov rdx, r12
lea rcx, [rsp + 0x70]
call fcn.140021580
mov r8, qword [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp + 0xf0]
call fcn.14017d4b8
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
cmp rcx, rax
je 0x140121405
call fcn.14016e4d0
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r14
mov r9d, 3
xor r8d, r8d
lea rdx, [rbp + 0xf0]
mov rcx, qword [rbp + 0xc0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
sete dil
mov qword [rbp + 0xb8], rbx
mov rcx, qword [rbp + 0xc0]
test rcx, rcx
je 0x14012144b
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test dil, dil
je 0x1401217c9
mov rbx, qword [r13 + 0xa0]
sub rbx, qword [r13 + 0x98]
sar rbx, 3
mov rcx, rsi
call fcn.1401207c0
xor r12d, r12d
xor r15d, r15d
movsxd rax, ebx
mov qword [rsp + 0x58], rax
test ebx, ebx
jle 0x140121642
nop dword [rax]
nop dword [rax + rax]
mov rbx, qword [r13 + 0x98]
mov rax, qword [r13 + 0xa0]
sub rax, rbx
sar rax, 3
cmp r12d, eax
jge 0x140121631
mov rbx, qword [rbx + r15*8]
test rbx, rbx
je 0x140121631
mov r14d, dword [rbx + 0xd0]
mov edi, dword [rbx + 0xd4]
test r14d, r14d
js 0x140121631
test edi, edi
js 0x140121631
mov r9d, 1
mov r8d, edi
mov edx, r14d
mov rcx, rsi
call fcn.140123f20
mov r13, rax
test byte [rbx + 0xd8], 1
je 0x1401215df
cmp dword [rbx + 0xdc], 0
jne 0x1401215df
call fcn.140015450
mov rcx, rax
test rax, rax
je 0x14012182a
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp + 0xd0], rax
mov r8d, r14d
lea rdx, str.SoundModeOnOutput_d
lea rcx, [rbp + 0xd0]
call fcn.140021720
mov dword [rbp + 0x90], edi
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rbx, qword [rbp + 0xd0]
mov rdx, rbx
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
cmp r14d, dword [rsi + 0x248]
jne 0x1401215c3
mov dword [rsi + 0x24c], edi
mov dword [rbp + 0x98], edi
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveSoundMode
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop
lea rdx, [rbx - 0x18]
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1401215df
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov r8d, edi
mov edx, r14d
mov rcx, qword [rsp + 0x50]
call fcn.140114720
test eax, eax
je 0x14012162c
test r13, r13
je 0x14012162c
mov dword [rbp + 0xa0], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r13 + 8]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov r13, qword [rsp + 0x50]
inc r12d
inc r15
cmp r15, qword [rsp + 0x58]
jl 0x140121490
lea rcx, [rsi + 0x140]
call fcn.140113f70
mov rcx, rsi
call fcn.14011ef60
mov rcx, rsi
call fcn.140124140
xor eax, eax
mov qword [rbp + 0x80], rax
mov qword [rbp + 0x88], rax
call fcn.14001ded0
mov qword [rbp + 0x80], rax
lea rdx, [rbp + 0x80]
lea rcx, [rsi + 0x140]
call fcn.140114c30
mov rax, qword [rbp + 0x80]
mov rdi, qword [rax]
cmp rdi, rax
je 0x1401217a9
xor eax, eax
mov qword [rbp + 0xa8], rax
mov qword [rbp + 0xb0], rax
lea rdx, [rdi + 0x28]
lea rcx, [rbp + 0xa8]
call fcn.1400ecdd0
nop
mov rax, qword [rbp + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140121735
mov rax, qword [rsi]
mov r8d, dword [rbx + 0x1c]
mov edx, dword [rdi + 0x20]
mov rcx, rsi
call qword [rax + QISearch]
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x14012170f
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x14012170a
cmp rbx, qword [rax + 0x10]
jne 0x14012170a
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401216f7
mov rbx, rax
jmp 0x14012172c
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x14012172c
nop dword [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140121720
cmp rbx, qword [rbp + 0xa8]
jne 0x1401216d0
lea rcx, [rbp + 0xa8]
call fcn.140016d80
mov edx, 0x20
mov rcx, qword [rbp + 0xa8]
call fcn.140146bac
mov rax, qword [rdi + 0x10]
cmp byte [rax + 0x19], 0
je 0x14012177e
mov rax, qword [rdi + 8]
cmp byte [rax + 0x19], 0
jne 0x140121779
cmp rdi, qword [rax + 0x10]
jne 0x140121779
mov rdi, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140121766
mov rdi, rax
jmp 0x14012179c
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x14012179c
nop word [rax + rax]
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140121790
cmp rdi, qword [rbp + 0x80]
jne 0x1401216a0
mov dil, 1
lea rcx, [rbp + 0x80]
call fcn.140115100
mov edx, 0x38
mov rcx, qword [rbp + 0x80]
call fcn.140146bac
cmp dword [rbp + 0x380], 1
je 0x1401217e7
test r13, r13
je 0x1401217e7
mov r8, qword [r13]
mov edx, 1
mov rcx, r13
call qword [r8]
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140121803
cmp dword [rbp + 0xd8], 0x102
je 0x140121803
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
movzx eax, dil
mov rcx, qword [rbp + 0x300]
xor rcx, rsp
call fcn.140146480
add rsp, 0x418
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400151f0
int3