Function at 0x140010ca0
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1e8]
sub rsp, 0x2e8
mov qword [rbp + 0x10], 0xfffffffffffffffe
mov rax, qword [0x1400710e0]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov r12, r9
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
mov qword [rsp + 0x58], rcx
xor r14b, r14b
mov eax, dword [rbp + 0x250]
cmp eax, 1
jne 0x140010d01
lea r13, [rcx + 0xcb8]
movzx r14d, al
jmp 0x140010d26
mov ecx, 0xf0
call fcn.140024200
test rax, rax
je 0x140010d1d
mov rcx, rax
call fcn.14001b1a0
mov r13, rax
jmp 0x140010d20
xor r13d, r13d
mov eax, dword [rbp + 0x250]
mov qword [rsp + 0x50], r13
test r13, r13
je 0x140010f02
cmp eax, 1
je 0x140010f02
mov r9d, 1
mov r8d, esi
mov rdx, rdi
mov rcx, r13
call fcn.14001b3b0
test al, al
jne 0x140010d71
mov r9d, 1
mov r8d, esi
mov rdx, rdi
mov rcx, r13
call fcn.14001b6b0
test al, al
je 0x140010f02
lea r15, vtable.CMaxxAudioRegistryPreset.0
mov qword [rbp - 0x40], r15
xor r8d, r8d
mov qword [rbp - 0x30], r8
mov ecx, dword [rbx + 0xc64]
mov eax, ecx
and eax, 2
cmp al, 2
jne 0x140010d99
mov eax, 0x200
jmp 0x140010daa
and cl, 4
mov eax, r8d
mov edx, 0x100
cmp cl, 4
cmove eax, edx
mov qword [rbp - 0x38], r8
or eax, 0x20017
mov qword [rsp + 0x40], r8
lea rcx, [rbp - 0x38]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r8d
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rbx + 0xc88]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x140010eef
mov byte [rbp + 0xc0], al
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0xc1]
call fcn.140026b30
lea r8, str.DefaultPreset
mov edx, 0x104
lea rcx, [rbp + 0xc0]
call fcn.140025e1c
lea r11, [rbp + 0x38]
mov qword [rbp + 0x30], r11
test r12, r12
jne 0x140010e39
xor r8d, r8d
mov qword [rbp + 0x30], r8
jmp 0x140010ea3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [rax + 1]
lea r8, [rbp + 0x38]
mov edx, ebx
lea rcx, [rbp + 0x30]
call fcn.140008250
movsxd rdx, ebx
mov r9, rdx
mov r8, r12
mov rcx, qword [rbp + 0x30]
call fcn.1400246c0
test eax, eax
je 0x140010e9f
cmp eax, 0xc
je 0x140010e94
cmp eax, 0x16
je 0x140010e89
cmp eax, 0x22
je 0x140010e89
cmp eax, 0x50
je 0x140010e9f
mov ecx, 0x80004005
call fcn.1400050a0
int3
mov ecx, 0x80070057
call fcn.1400050a0
int3
mov ecx, 0x8007000e
call fcn.1400050a0
int3
mov r8, qword [rbp + 0x30]
mov edx, 0x104
lea rcx, [rbp + 0xc0]
call fcn.140026090
lea r11, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
cmp rcx, r11
je 0x140010ec6
call fcn.140024614
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rdi
mov r9d, 3
xor r8d, r8d
lea rdx, [rbp + 0xc0]
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
sete r14b
mov qword [rbp - 0x40], r15
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x140010f02
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r14b, r14b
je 0x1400115b2
mov rbx, qword [r13 + 0xb0]
sub rbx, qword [r13 + 0xa8]
sar rbx, 3
mov r14, qword [rsp + 0x58]
mov rcx, r14
call fcn.140010350
xor r13d, r13d
xor r12d, r12d
movsxd r15, ebx
test ebx, ebx
jle 0x140011110
mov rax, qword [rsp + 0x50]
mov rbx, qword [rax + 0xa8]
mov rax, qword [rax + 0xb0]
sub rax, rbx
sar rax, 3
cmp r13d, eax
jge 0x1400110fc
mov rbx, qword [rbx + r12*8]
test rbx, rbx
je 0x1400110fc
mov esi, dword [rbx + 0xa8]
mov edi, dword [rbx + 0xac]
test esi, esi
js 0x1400110fc
test edi, edi
js 0x1400110fc
mov r9d, 1
mov r8d, edi
mov edx, esi
mov rcx, r14
call fcn.140013b20
mov r14, rax
test byte [rbx + 0xb0], 1
je 0x14001105e
cmp dword [rbx + 0xb4], 0
jne 0x14001105e
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x68], rax
mov r8d, esi
lea rdx, str.SoundModeOnOutput_d
lea rcx, [rbp - 0x68]
call fcn.140016a40
mov rcx, qword [rsp + 0x58]
add rcx, 0xc10
mov r8d, edi
mov rbx, qword [rbp - 0x68]
mov rdx, rbx
call fcn.140020090
mov rax, qword [rsp + 0x58]
cmp esi, dword [rax + 0xda8]
jne 0x140011043
mov dword [rax + 0xdac], edi
mov dword [rbp - 0x70], edi
mov dword [rsp + 0x28], 4
lea rcx, [rbp - 0x70]
mov qword [rsp + 0x20], rcx
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveSoundMode
mov rcx, qword [rax + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14001105e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0xa8]
mov r9, qword [rax + 0xb0]
sub r9, rcx
sar r9, 3
test r9d, r9d
jle 0x1400110f0
mov rax, qword [rcx]
test rax, rax
je 0x1400110aa
cmp esi, dword [rax + 0xa8]
jne 0x1400110aa
cmp edi, dword [rax + 0xac]
jne 0x1400110aa
test byte [rax + 0xb0], 1
je 0x1400110aa
or r8d, dword [rax + 0xb4]
inc edx
add rcx, 8
cmp edx, r9d
jl 0x140011082
test r8d, r8d
je 0x1400110f7
test r14, r14
je 0x1400110f7
mov dword [rbp - 0x80], r8d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r14 + 8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x1400110f7
mov r14, qword [rsp + 0x58]
jmp 0x140011101
mov r14, qword [rsp + 0x58]
mov rax, qword [rsp + 0x50]
inc r13d
inc r12
cmp r12, r15
jl 0x140010f40
lea rcx, [r14 + 0xcb8]
call fcn.14001bed0
mov rcx, r14
call fcn.14000f160
mov rcx, r14
call fcn.140013ce0
xor r15d, r15d
mov qword [rsp + 0x70], r15
lea ecx, [r15 + 0x48]
call fcn.140024200
test rax, rax
je 0x140011585
mov qword [rsp + 0x68], rax
mov qword [rax], rax
mov rax, qword [rsp + 0x68]
mov qword [rax + 8], rax
mov rax, qword [rsp + 0x68]
mov qword [rax + 0x10], rax
mov rax, qword [rsp + 0x68]
mov byte [rax + 0x40], 1
mov rax, qword [rsp + 0x68]
mov byte [rax + 0x41], 1
mov edi, r15d
mov rax, qword [r14 + 0xd68]
sub rax, qword [r14 + 0xd60]
sar rax, 3
test eax, eax
jle 0x140011201
mov r12d, r15d
cmp r15d, eax
jge 0x1400111e5
mov rax, qword [r14 + 0xd60]
mov rcx, qword [r12 + rax]
test rcx, rcx
je 0x1400111e5
mov eax, dword [rcx + 0xa8]
mov dword [rbp - 0x78], eax
mov eax, dword [rcx + 0xac]
mov dword [rbp - 0x74], eax
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x60]
call fcn.14001ceb0
mov rbx, rax
lea rdx, [rbp - 0x74]
mov rcx, rax
call fcn.14001d960
mov r8, rax
lea rdx, [rbp + 0x18]
mov rcx, rbx
call fcn.14001deb0
inc edi
add r12, 8
mov rax, qword [r14 + 0xd68]
sub rax, qword [r14 + 0xd60]
sar rax, 3
cmp edi, eax
jl 0x140011197
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsi]
cmp rdi, rsi
je 0x1400113bc
lea rdx, [rdi + 0x20]
lea rcx, [rbp - 0x60]
call fcn.140015980
nop
mov rsi, qword [rbp - 0x58]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x140011297
nop dword [rax]
mov rax, qword [r14]
mov r8d, dword [rbx + 0x18]
mov edx, dword [rdi + 0x18]
mov rcx, r14
call qword [rax + 0xd0]
cmp byte [rbx + 0x1d], 0
jne 0x14001128e
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x1d], 0
jne 0x14001126e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
jne 0x14001128e
nop
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
je 0x140011260
jmp 0x14001128e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x1d], 0
jne 0x14001128b
cmp rbx, qword [rax + 0x10]
jne 0x14001128b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x1d], 0
je 0x140011278
mov rbx, rax
mov rsi, qword [rbp - 0x58]
cmp rbx, rsi
jne 0x140011230
mov rbx, qword [rsi]
cmp rbx, rbx
jne 0x1400112ee
mov r12, qword [rsi + 8]
mov rbx, r12
cmp byte [r12 + 0x1d], 0
jne 0x1400112d5
nop
mov rdx, qword [rbx + 0x10]
lea rcx, [rbp - 0x60]
call fcn.140016930
mov rbx, qword [rbx]
mov rcx, r12
call fcn.140023c7c
mov r12, rbx
cmp byte [rbx + 0x1d], 0
je 0x1400112b0
mov rsi, qword [rbp - 0x58]
mov qword [rsi + 8], rsi
mov rax, qword [rbp - 0x58]
mov qword [rax], rax
mov rax, qword [rbp - 0x58]
mov qword [rax + 0x10], rax
mov qword [rbp - 0x50], r15
jmp 0x140011358
cmp rbx, rsi
je 0x14001135c
mov r8, rbx
cmp byte [rbx + 0x1d], 0
jne 0x140011346
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x1d], 0
jne 0x140011320
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
jne 0x140011346
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
je 0x140011312
jmp 0x140011346
mov rax, qword [rbx + 8]
cmp byte [rax + 0x1d], 0
jne 0x140011343
nop word [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x140011343
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x1d], 0
je 0x140011330
mov rbx, rax
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x60]
call fcn.140016420
cmp rbx, rsi
jne 0x1400112f3
mov rsi, qword [rbp - 0x58]
mov rcx, rsi
call fcn.140023c7c
cmp byte [rdi + 0x41], 0
jne 0x1400113ae
mov rax, qword [rdi + 0x10]
cmp byte [rax + 0x41], 0
jne 0x14001138e
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x41], 0
jne 0x1400113ae
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x41], 0
je 0x140011380
jmp 0x1400113ae
mov rax, qword [rdi + 8]
cmp byte [rax + 0x41], 0
jne 0x1400113ab
cmp rdi, qword [rax + 0x10]
jne 0x1400113ab
mov rdi, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x41], 0
je 0x140011398
mov rdi, rax
mov rsi, qword [rsp + 0x68]
cmp rdi, rsi
jne 0x140011212
mov r14b, 1
mov rbx, qword [rsi]
cmp rbx, rbx
jne 0x140011508
mov r13, qword [rsi + 8]
mov r12, r13
cmp byte [r13 + 0x41], 0
jne 0x1400114ec
nop dword [rax]
mov rdx, qword [r12 + 0x10]
lea rcx, [rsp + 0x60]
call fcn.1400168a0
mov r12, qword [r12]
lea rsi, [r13 + 0x20]
mov qword [rbp - 0x28], rsi
mov rdi, qword [rsi + 8]
mov rbx, qword [rdi]
cmp rbx, rbx
jne 0x14001145d
cmp rdi, rdi
jne 0x14001145d
mov rdi, qword [rdi + 8]
mov rbx, rdi
cmp byte [rdi + 0x1d], 0
jne 0x140011440
nop dword [rax]
mov rdx, qword [rbx + 0x10]
mov rcx, rsi
call fcn.140016930
mov rbx, qword [rbx]
mov rcx, rdi
call fcn.140023c7c
mov rdi, rbx
cmp byte [rbx + 0x1d], 0
je 0x140011420
mov rax, qword [rsi + 8]
mov qword [rax + 8], rax
mov rax, qword [rsi + 8]
mov qword [rax], rax
mov rax, qword [rsi + 8]
mov qword [rax + 0x10], rax
mov qword [rsi + 0x10], r15
jmp 0x1400114c7
cmp rbx, rdi
je 0x1400114c7
mov r8, rbx
cmp byte [rbx + 0x1d], 0
jne 0x1400114b6
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x1d], 0
jne 0x14001148f
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
jne 0x1400114b6
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x1d], 0
je 0x140011481
jmp 0x1400114b6
mov rax, qword [rbx + 8]
cmp byte [rax + 0x1d], 0
jne 0x1400114b3
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x1400114b3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x1d], 0
je 0x1400114a0
mov rbx, rax
lea rdx, [rbp + 8]
mov rcx, rsi
call fcn.140016420
cmp rbx, rdi
jne 0x140011462
mov rcx, qword [rsi + 8]
call fcn.140023c7c
mov rcx, r13
call fcn.140023c7c
mov r13, r12
cmp byte [r12 + 0x41], 0
je 0x1400113e0
mov rsi, qword [rsp + 0x68]
mov qword [rsi + 8], rsi
mov rax, qword [rsp + 0x68]
mov qword [rax], rax
mov rax, qword [rsp + 0x68]
mov qword [rax + 0x10], rax
mov qword [rsp + 0x70], r15
jmp 0x140011571
cmp rbx, rsi
je 0x140011576
nop dword [rax]
mov r8, rbx
cmp byte [rbx + 0x41], 0
jne 0x14001155e
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x41], 0
jne 0x14001153e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x41], 0
jne 0x14001155e
nop
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x41], 0
je 0x140011530
jmp 0x14001155e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x41], 0
jne 0x14001155b
cmp rbx, qword [rax + 0x10]
jne 0x14001155b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x41], 0
je 0x140011548
mov rbx, rax
lea rdx, [rbp]
lea rcx, [rsp + 0x60]
call fcn.1400160c0
cmp rbx, rsi
jne 0x140011510
mov rsi, qword [rsp + 0x68]
mov rcx, rsi
call fcn.140023c7c
mov r13, qword [rsp + 0x50]
jmp 0x1400115b2
mov qword [rbp - 0x20], r15
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x18]
call fcn.140023d74
lea r11, vtable.std::bad_alloc.0
mov qword [rbp - 0x18], r11
lea rdx, [0x14006f580]
lea rcx, [rbp - 0x18]
call fcn.140026c1c
int3
cmp dword [rbp + 0x250], 1
je 0x1400115cf
test r13, r13
je 0x1400115cf
mov r8, qword [r13]
mov edx, 1
mov rcx, r13
call qword [r8]
movzx eax, r14b
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140023ca0
add rsp, 0x2e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret