Function at 0x140057440
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory
Get system information on windows
Resolve function by parsing pe exports

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x10100
call fcn.140248980
sub rsp, rax
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rsp + 0x10138], rbx
mov qword [rsp + 0x10140], rbp
mov qword [rsp + 0x10148], rsi
mov rax, qword [0x140315d90]
xor rax, rsp
mov qword [rsp + 0x100f0], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x1400574a4
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x140057da2
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140057da2
xor r13d, r13d
mov esi, r13d
cmp dword [rax + 0x54c], r13d
jbe 0x140057519
mov rdi, r13
nop
nop
nop
nop
lea rcx, [rax + 0x540]
mov edx, esi
call fcn.1400d9530
test eax, eax
je 0x140057503
mov rcx, qword [rbx + 0x10]
movzx eax, word [rdi + rcx + 0x57c]
bt ax, 9
jb 0x140057503
test al, 8
je 0x140057503
test byte [rdi + rcx + 0x574], 1
je 0x140057521
add esi, 1
add rdi, 0xa4
mov rax, qword [rbx + 0x10]
cmp esi, dword [rax + 0x54c]
jb 0x1400574d0
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x40
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x84], 0x11
jae 0x140057537
mov rcx, rbx
call fcn.1400583a0
mov rax, qword [rbx + 0x10]
test byte [rax + 0xb], 1
je 0x140057549
mov rcx, rbx
call fcn.1400591f0
mov esi, r13d
mov rax, qword [rbx + 0x10]
mov rdx, qword [rax + 0x1a20]
lea r14, [0x140273028]
or rbp, 0xffffffffffffffff
lea r15d, [rbp + 2]
test rdx, rdx
je 0x14005772d
nop
mov rcx, rdx
test rdx, rdx
je 0x140057727
mov rdx, qword [rdx]
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x1400575f4
mov eax, dword [rcx + 0xb8]
cmp eax, 8
je 0x140057598
cmp eax, 9
jne 0x1400575e1
cmp dword [rcx + 0x48], r13d
je 0x1400575e1
mov eax, dword [rcx + 0x17c]
bt eax, 0xc
jb 0x1400575cb
mov edi, dword [rcx + 0x180]
bt edi, 0x1d
jb 0x1400575cb
test byte [rcx + 0x184], r15b
je 0x1400575c5
bt eax, 0xb
jb 0x1400575cb
test dil, 0x40
je 0x1400575e1
test r15b, al
jne 0x1400575d6
bt eax, 0xa
jae 0x1400575e1
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x20000
mov eax, dword [rcx + 0x180]
test r15b, al
je 0x1400575f4
bt eax, 0x14
cmovb esi, r15d
test rdx, rdx
jne 0x140057570
test esi, esi
je 0x14005772d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
call fcn.1401fa4b0
mov rdx, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x140057639
mov ecx, 0x80004005
call fcn.140003d20
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
test r14, 0xffffffffffff0000
jne 0x140057676
movzx edi, r14w
mov ecx, edi
call fcn.1401fc234
test rax, rax
je 0x140057696
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140007610
jmp 0x140057696
xor eax, eax
mov rcx, rbp
mov rdi, r14
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.140007880
nop
call fcn.1401fa4b0
mov rdx, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400576b6
mov ecx, 0x80004005
call fcn.140003d20
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x58], rax
lea rdx, str.RAVBg64.exe
test rdx, 0xffffffffffff0000
jne 0x1400576f9
movzx edi, dx
mov ecx, edi
call fcn.1401fc234
test rax, rax
je 0x140057716
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140007610
jmp 0x140057716
xor eax, eax
mov rcx, rbp
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x58]
call fcn.140007880
nop
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x58]
call fcn.1400439c0
jmp 0x14005772d
call fcn.1401f8920
int3
mov rax, qword [rbx + 0x10]
lea r12, [0x140000000]
bt dword [rax + 0x34], 8
jae 0x140057843
xor r9d, r9d
lea r8, str.SpdifFinished
lea rdx, str.DefLevel
lea rcx, [0x14032a360]
call fcn.1401ffa54
test eax, eax
jne 0x140057843
mov rax, qword [rbx + 0x10]
mov rcx, qword [rax + 0x1a20]
test rcx, rcx
je 0x140057843
nop
mov rax, rcx
test rcx, rcx
je 0x14005783d
mov rcx, qword [rcx]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1400577a1
cmp dword [rax + 0xb8], 8
je 0x1400577ac
test rcx, rcx
je 0x140057843
jmp 0x140057780
mov rax, qword [rax + 0xc8]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x140057843
cmp dword [rcx + 0x3c], 0
je 0x140057843
lea rdx, [rsp + 0xa0]
mov rax, qword [r12 + 0x26de98]
mov qword [rdx], rax
mov rax, qword [r12 + 0x26dea0]
mov qword [rdx + 8], rax
lea r8, [rsp + 0xa0]
mov edx, 0x32
call fcn.140141c70
test eax, eax
jne 0x14005781e
lea r9, str.Set_SPDIF_Vol_to_50_failed.
lea r8, str.Warning
lea rdx, str.DefLevel
lea rcx, [0x14032a360]
call fcn.1401ffbb4
jmp 0x140057843
mov r9d, r15d
lea r8, str.SpdifFinished
lea rdx, str.DefLevel
lea rcx, [0x14032a360]
call fcn.1401ffaf4
jmp 0x140057843
call fcn.1401f8920
int3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0xac], 0x1a
jae 0x1400578b0
add rdi, 0x540
je 0x1400578b0
movsxd rdx, dword [rdi + 0x1c]
cmp edx, 0xffffffff
je 0x14005788b
mov rax, rdx
imul rax, rax, 0xa4
cmp dword [rax + rdi + 0xc4], 0
je 0x14005788b
mov rcx, rdi
call fcn.1400d9a00
movsxd rdx, dword [rdi + 0x24]
cmp edx, 0xffffffff
je 0x1400578b0
mov rax, rdx
imul rax, rax, 0xa4
cmp dword [rax + rdi + 0xc4], 0
je 0x1400578b0
mov rcx, rdi
call fcn.1400d9a00
xor edx, edx
xor ecx, ecx
call fcn.140065620
xor edx, edx
mov ecx, r15d
call fcn.140065620
mov dword [rsp + 0xb8], r13d
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0xbc]
call fcn.14022a8c0
lea rcx, [rsp + 0xb8]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140057b3d
xor eax, eax
mov rcx, rbp
lea rdi, [rsp + 0xf0]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0xec], 0x5c
jne 0x14005792d
mov word [rsp + rcx*2 + 0xec], ax
cmp word [rsp + 0xb8], 9
jne 0x140057953
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140228690
jmp 0x14005796c
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140228690
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
call fcn.1401fa4b0
mov rdx, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x140057996
mov ecx, 0x80004005
call fcn.140003d20
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0xf0]
lea rax, [rsp + 0xf0]
test rax, 0xffffffffffff0000
jne 0x1400579e1
movzx edi, cx
mov ecx, edi
call fcn.1401fc234
test rax, rax
je 0x140057a0b
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140007610
jmp 0x140057a0b
xor eax, eax
mov rcx, rbp
lea rdi, [rsp + 0xf0]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x40]
call fcn.140007880
nop
mov rdi, r14
mov rax, qword [rsp + 0x40]
mov rsi, rax
mov rcx, r15
repe cmpsw word [rsi], word [rdi]
jne 0x140057a3b
lea rdx, [rax - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140057a6d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140057a6d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140057aff
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140057a6d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0xf0]
call fcn.14022a8c0
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x20], rdx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140057b1f
lea r8, str.RealtekAudioAP
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140228690
cmp word [rsp + 0xb8], 9
jne 0x140057ae4
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140228690
jmp 0x140057b1f
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140228690
jmp 0x140057b1f
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140057b1f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140057b3d
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x20000000
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xb8], 0xa
jae 0x140057c8f
mov dword [rsp + 0x68], r13d
mov rcx, qword [rax + 0x4c8]
test rcx, rcx
je 0x140057c8f
lea rdx, [rsp + 0x90]
mov rax, qword [r12 + 0x26de28]
mov qword [rdx], rax
mov rax, qword [r12 + 0x26de30]
mov qword [rdx + 8], rax
mov dword [rsp + 0x70], r13d
xor eax, eax
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x78], eax
mov dword [rsp + 0x7c], eax
mov dword [rsp + 0x80], eax
mov dword [rsp + 0x84], eax
mov dword [rsp + 0x48], r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rax + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140057c8f
lea rdx, [rsp + 0x70]
lea rax, [rsp + 0x90]
mov rcx, qword [rax]
mov qword [rdx], rcx
mov rcx, qword [rax + 8]
mov qword [rdx + 8], rcx
mov dword [rsp + 0x84], 2
mov dword [rsp + 0x80], 0x21
mov dword [rsp + 0x48], r13d
mov qword [rsp + 0x38], r13
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x18
lea r8, [rsp + 0x70]
mov edx, 0x2f0003
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x140057c8f
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x60]
call fcn.14003c180
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x140057c8f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xc], 0xd
jae 0x140057ca2
mov rcx, rbx
call fcn.14005c4e0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x18], 0xa
jae 0x140057d4b
mov rax, qword [rax + 0x1a20]
test rax, rax
je 0x140057d4b
mov rdi, rax
test rax, rax
je 0x140057d45
mov rax, qword [rax]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x140057ce2
cmp dword [rdi + 0xb8], 1
je 0x140057ce9
test rax, rax
je 0x140057d4b
jmp 0x140057cc1
cmp dword [rdi + 0xb8], 1
jne 0x140057d4b
mov rdi, qword [rdi + 0x100]
test rdi, rdi
je 0x140057d4b
nop
mov rsi, rdi
test rdi, rdi
je 0x140057d3f
mov rdi, qword [rdi]
mov rsi, qword [rsi + 0x10]
test rsi, rsi
je 0x140057d22
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x28]
cmp eax, 0x14
je 0x140057d29
test rdi, rdi
je 0x140057d4b
jmp 0x140057d00
mov rcx, rsi
call fcn.14018b1f0
test eax, eax
je 0x140057d4b
mov rcx, rsi
call fcn.14018ba40
jmp 0x140057d4b
call fcn.1401f8920
int3
call fcn.1401f8920
int3
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0x38], 0x1f
jae 0x140057da2
mov rax, qword [rdi + 0x19f8]
bt dword [rax + 0x38], 0x1f
jae 0x140057da2
mov r9d, r15d
lea r8, str.AutoSelectChannelByJackConf
lea rdx, str.General
lea rcx, [0x14032a360]
call fcn.1401ffa54
test eax, eax
je 0x140057da2
mov rax, qword [rdi + 0x19f8]
bt dword [rax + 0x190], 8
jae 0x140057da2
lea rcx, [rdi + 0x540]
call fcn.1400db610
mov rcx, qword [rsp + 0x100f0]
xor rcx, rsp
call fcn.1402272f0
lea r11, [rsp + 0x10100]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret