Function at 0x140016170
Capabilities:
Check os version

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x1403b88b0]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov rbx, qword [rcx + 0x398]
mov rdi, rcx
test rbx, rbx
jne 0x1400161bc
lea r8, str.c:userschunyung_source_repos_rtkngui_rtkngui_audiodevice.cpp
mov edx, 0x1e4
lea rcx, str._VCpl__RETURN_FALSE_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
xor eax, eax
jmp 0x140016573
cmp qword [rcx + 0x90], 0
jne 0x1400161e5
lea r8, str.c:userschunyung_source_repos_rtkngui_rtkngui_audiodevice.cpp
mov edx, 0x1e5
lea rcx, str._VCpl__RETURN_FALSE_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
xor eax, eax
jmp 0x140016573
mov qword [rsp + 0x188], r13
xor r13d, r13d
mov dword [rcx + 0x3a0], r13d
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x44], r13d
cmp qword [rcx + 0x380], r13
je 0x140016569
mov qword [rsp + 0x178], rsi
lea r8d, [r13 + 0x68]
mov qword [rsp + 0x180], r12
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x148], r14
xor edx, edx
mov qword [rsp + 0x140], r15
call fcn.1402841a0
xor edx, edx
lea r8d, [r13 + 0x54]
mov rcx, rbx
call fcn.1402841a0
lea edx, [r13 + 0x18]
mov qword [rsp + 0x48], r13
lea r8d, [r13 + 0x1f]
mov r15d, r13d
lea r10d, [r13 + 0x20]
mov r12d, r13d
lea r11d, [r13 + 0x16]
lea rsi, [0x1403be5f0]
nop
mov rcx, qword [rdi + 0x398]
lea rbx, reloc.OLEAUT32.dll_VariantClear
mov eax, dword [rsi]
mov r14d, r13d
mov dword [r12 + rcx], eax
mov r12d, 0xfffe
nop dword [rax]
cmp dword [0x1403db8d4], r13d
jne 0x1400162c1
lea rcx, [0x1403db8d0]
mov dword [0x1403db8d0], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov edx, 0x18
lea r10d, [rdx + 8]
lea r8d, [rdx + 7]
lea r11d, [rdx - 2]
cmp dword [0x1403db8d4], 6
jne 0x1400162d8
cmp dword [0x1403db8d8], r13d
mov ecx, 1
je 0x1400162db
mov ecx, r13d
test ecx, ecx
mov eax, edx
cmove eax, r8d
cmp r14d, eax
jge 0x1400164eb
mov rax, qword [rdi + 0x90]
test dword [rax + 0x1f8], 0x8000000
jne 0x140016309
cmp r10w, word [rbx]
je 0x1400164d9
movzx edx, word [rbx]
xor eax, eax
movups xmm0, xmmword [0x1403290a8]
movzx ecx, word [rsi + 4]
movzx r9d, dx
movups xmm1, xmmword [0x140329098]
mov r8d, dword [rbx - 4]
mov dword [rbp - 0x6e], eax
mov dword [rbp - 0x64], eax
movaps xmmword [rsp + 0x60], xmm0
movups xmm0, xmmword [0x140329088]
mov qword [rsp + 0x58], rax
lea eax, [r9 - 0x11]
mov qword [rsp + 0x50], 0x52
movaps xmmword [rsp + 0x70], xmm1
movaps xmmword [rbp - 0x80], xmm0
mov word [rbp - 0x70], r12w
mov word [rbp - 0x6e], cx
mov dword [rbp - 0x6c], r8d
mov word [rbp - 0x62], dx
cmp ax, 0xf
ja 0x140016373
mov edx, r10d
mov word [rbp - 0x62], dx
movzx eax, dx
movzx ecx, cx
imul eax, ecx
mov word [rbp - 0x5e], r9w
lea r9, [rsp + 0x40]
mov word [rbp - 0x60], r11w
movups xmmword [rbp - 0x58], xmm1
mov dword [rsp + 0x40], r13d
cdq
and edx, 7
add eax, edx
lea rdx, [rsp + 0x50]
sar eax, 3
movzx ecx, ax
imul ecx, r8d
mov r8d, 0x68
mov word [rbp - 0x64], ax
mov eax, dword [rsi + 8]
mov dword [rbp - 0x5c], eax
mov dword [rbp - 0x68], ecx
mov rcx, qword [rdi + 0x380]
mov rax, qword [rcx]
call qword [rax + 0x18]
movaps xmm2, xmmword [rbp - 0x70]
movaps xmm0, xmmword [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x60]
pextrw eax, xmm2, 7
movaps xmmword [rbp - 0x40], xmm0
movaps xmm0, xmmword [rsp + 0x70]
movaps xmmword [rbp - 0x30], xmm1
movaps xmm1, xmmword [rbp - 0x80]
mov word [rbp - 0x62], ax
sub ax, 0x11
movaps xmmword [rbp - 0x20], xmm0
movaps xmm0, xmmword [rbp - 0x60]
movaps xmmword [rbp - 0x10], xmm1
movsd xmm1, qword [rbp - 0x50]
movaps xmmword [rbp], xmm2
movaps xmmword [rbp + 0x10], xmm0
movsd qword [rbp + 0x20], xmm1
cmp ax, 0xf
ja 0x140016424
mov eax, 0x18
mov word [rbp + 0xe], ax
jmp 0x140016428
movzx eax, word [rbp + 0xe]
movzx ecx, word [rbp + 2]
lea r9, [rsp + 0x44]
movzx eax, ax
mov r8d, 0x68
imul eax, ecx
mov dword [rsp + 0x44], r13d
cdq
and edx, 7
add eax, edx
lea rdx, [rbp - 0x40]
sar eax, 3
movzx ecx, ax
imul ecx, dword [rbp + 4]
mov word [rbp + 0xc], ax
mov dword [rbp + 8], ecx
mov rcx, qword [rdi + 0x380]
mov rax, qword [rcx]
call qword [rax + 0x18]
cmp dword [rsp + 0x40], r13d
jne 0x140016478
cmp dword [rsp + 0x44], r13d
je 0x1400164cb
mov ecx, dword [rbx - 0xc]
lea rdx, str.CAudioDevice::CheckDataFormat
mov rax, qword [rdi + 0x398]
add rcx, r15
mov r8d, 0x230
lea rcx, [rax + rcx*4]
mov eax, dword [rbx - 8]
or dword [rcx + 4], eax
mov eax, dword [rsi]
or dword [rdi + 0x3a0], eax
movzx eax, word [rbp - 0x6e]
movzx ecx, word [rbp - 0x62]
mov r9, qword [rsi + 0x10]
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x6c]
mov dword [rsp + 0x28], ecx
lea rcx, str._s__d__s_is_supported__SampleRate___d_Bits___d_Channels___d_
mov dword [rsp + 0x20], eax
call fcn.140052e90
mov r8d, 0x1f
lea r10d, [r8 + 1]
lea edx, [r8 - 7]
inc r14d
mov r11d, 0x16
add rbx, 0x18
jmp 0x140016290
mov r12, qword [rsp + 0x48]
lea rax, [0x1403be698]
add r12, 0xc
add rsi, 0x18
add r15, 3
mov qword [rsp + 0x48], r12
cmp rsi, rax
jl 0x140016270
mov ecx, dword [rdi + 0x3a0]
mov r15, qword [rsp + 0x140]
mov r14, qword [rsp + 0x148]
mov r12, qword [rsp + 0x180]
mov rsi, qword [rsp + 0x178]
test cl, 0x20
je 0x140016555
mov rdx, qword [rdi + 0x90]
test rdx, rdx
je 0x140016555
or dword [rdx + 0x2c], 0x200
mov ecx, dword [rdi + 0x3a0]
test ecx, ecx
jne 0x140016562
cmp dword [rdi + 0x1d8], 9
je 0x140016569
mov eax, 1
jmp 0x14001656b
xor eax, eax
mov r13, qword [rsp + 0x188]
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.140281bf0
add rsp, 0x150
pop rdi
pop rbx
pop rbp
ret