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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov qword [rbp - 0x61], 0xfffffffffffffffe
mov qword [rsp + 0x128], rbx
mov rax, qword [0x1402f2080]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov byte [rbp - 0x78], r9b
mov r12d, r8d
mov dword [rbp - 0x75], r8d
mov r13d, edx
mov dword [rbp - 0x71], edx
mov rsi, rcx
xor eax, eax
mov qword [rbp + 7], rax
mov r15, qword [rcx + 0x470]
mov qword [rbp - 0x69], r15
mov edi, 0xffffffff
mov dword [rbp + 7], edi
mov qword [rbp + 0xf], r15
test r15, r15
je 0x1401221df
mov edx, 0xbb8
mov rcx, r15
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov edi, eax
mov dword [rbp + 7], eax
mov rcx, rsi
call fcn.140124140
mov rcx, rsi
call fcn.1401207c0
cmp r13d, 0xffffffff
jne 0x140122200
mov r13d, dword [rsi + 0x248]
mov dword [rbp - 0x71], r13d
mov r14b, 1
mov byte [rbp - 0x79], r14b
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x51], xmm0
call fcn.140016e40
mov qword [rbp - 0x51], rax
lea rcx, [rsi + 0x140]
lea r8, [rbp - 0x51]
mov edx, r13d
call fcn.140114950
mov rax, qword [rbp - 0x51]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140122690
nop dword [rax + rax]
call fcn.140015450
mov rcx, rax
test rax, rax
je 0x1401226e9
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 1], rax
mov r8d, dword [rbx + 0x1c]
lea rdx, str.SoundModeOnOutput_d
lea rcx, [rbp - 1]
call fcn.140021720
mov rdi, qword [rbp - 1]
cmp r12d, 0xffffffff
jne 0x14012237c
mov eax, dword [rsi + 0x24c]
mov dword [rbp - 0x59], eax
mov dword [rbp - 0x41], 4
lea rax, [rbp - 0x41]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x59]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x17]
xor r8d, r8d
mov rdx, rdi
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1401222cb
mov r12d, dword [rbp - 0x59]
mov dword [rbp - 0x75], r12d
jmp 0x14012237c
mov r14d, dword [rbx + 0x1c]
mov rcx, rsi
call fcn.140124140
mov rcx, rsi
call fcn.1401207c0
mov r12d, dword [rsi + 0x24c]
mov dword [rbp - 0x75], r12d
cmp r14d, 0xffffffff
jne 0x1401222f7
mov r14d, dword [rsi + 0x248]
test r14d, r14d
js 0x140122377
xor ecx, ecx
lea r9d, [rcx + 1]
mov r11, qword [rsi + 0x1e0]
mov r10, r11
sub r10, qword [rsi + 0x1d8]
sar r10, 3
xor r8d, r8d
nop word [rax + rax]
cmp ecx, r10d
jge 0x140122373
mov rdx, qword [rsi + 0x1d8]
mov rax, r11
sub rax, rdx
sar rax, 3
cmp ecx, eax
jge 0x140122368
mov rax, qword [r8 + rdx]
test rax, rax
je 0x140122368
cmp r14d, dword [rax + 0xd0]
jne 0x140122368
test byte [rax + 0xd8], 1
je 0x140122368
cmp dword [rax + 0xdc], 0
jne 0x140122368
xor r9d, r9d
mov r12d, dword [rax + 0xd4]
inc ecx
add r8, 8
test r9d, r9d
jne 0x140122320
mov dword [rbp - 0x75], r12d
movzx r14d, byte [rbp - 0x79]
mov eax, dword [rbx + 0x1c]
test eax, eax
js 0x1401225c4
test r12d, r12d
js 0x1401225c4
mov r9d, 1
mov r8d, r12d
mov edx, eax
mov rcx, rsi
call fcn.140123f20
mov r15, rax
test rax, rax
je 0x1401225bb
mov dword [rbp - 0x39], 0
mov dword [rbp - 0x3d], 4
lea rax, [rbp - 0x3d]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x1b]
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r15 + 8]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x14012242f
mov r8d, r12d
mov edx, dword [rbx + 0x1c]
lea rcx, [rsi + 0x140]
call fcn.140114720
test eax, eax
je 0x14012242f
mov dword [rbp - 0x31], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r15 + 8]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov dword [rbp - 0x29], r12d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, rdi
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test r13d, r13d
jns 0x140122471
mov eax, dword [rsi + 0x248]
cmp dword [rbx + 0x1c], eax
jne 0x140122569
mov r13d, dword [rsi + 0x248]
mov r12d, dword [rbx + 0x1c]
mov dword [rsi + 0x248], r12d
mov eax, dword [rbp - 0x75]
mov dword [rsi + 0x24c], eax
mov eax, dword [rsi + 0xe8]
cmp eax, 9
je 0x1401224a1
cmp eax, 6
je 0x1401224a1
xor r14b, r14b
jmp 0x1401224a4
mov r14b, 1
mov dword [rbp - 0x21], r12d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveOutputMode
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov eax, dword [rsi + 0x24c]
mov dword [rbp - 0x19], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x19]
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]
cmp r13d, r12d
je 0x140122528
test r14b, r14b
jne 0x140122528
mov rax, qword [rsi]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [rax + 0x88]
movzx r9d, byte [rbp - 0x78]
mov byte [rsp + 0x20], 0
mov r8, r15
xor edx, edx
mov rcx, rsi
call fcn.140124560
cmp r13d, r12d
je 0x14012255c
test r14b, r14b
jne 0x14012255c
mov rax, qword [rsi]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rsi
call qword [rax + 0x88]
mov r12d, dword [rbp - 0x75]
movzx r14d, byte [rbp - 0x79]
mov r13d, dword [rbp - 0x71]
lea rdx, [rdi - 0x18]
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140122585
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x14012265a
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401225b3
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x1401225b3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401225a0
mov rbx, rax
jmp 0x14012267f
xor r14b, r14b
mov byte [rbp - 0x79], r14b
jmp 0x140122569
cmp eax, 0xfffffffe
jne 0x14012260a
mov dword [rsi + 0x248], 0xfffffffe
mov dword [rbp - 0x11], 0xfffffffe
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveOutputMode
mov rcx, qword [rsi + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
jmp 0x140122611
xor r14b, r14b
mov byte [rbp - 0x79], r14b
cmp r12d, 0xfffffffe
jne 0x1401225bb
mov dword [rsi + 0x24c], 0xfffffffe
mov dword [rbp - 9], 0xfffffffe
mov dword [rsp + 0x28], 4
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
lea r9d, [r12 + 6]
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]
jmp 0x140122569
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x14012267f
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140122670
cmp rbx, qword [rbp - 0x51]
jne 0x140122240
mov edi, dword [rbp + 7]
mov r15, qword [rbp - 0x69]
lea rcx, [rbp - 0x51]
call fcn.140016d80
mov edx, 0x20
mov rcx, qword [rbp - 0x51]
call fcn.140146bac
nop
test r15, r15
je 0x1401226be
cmp edi, 0x102
je 0x1401226be
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
movzx eax, r14b
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.140146480
mov rbx, qword [rsp + 0x128]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400151f0
int3