Function at 0x140052120
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 rsi
push rdi
push r12
push r13
push r14
mov eax, 0x10110
call fcn.140237890
sub rsp, rax
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rsp + 0x10148], rbx
mov qword [rsp + 0x10150], rbp
mov rax, qword [0x140300da0]
xor rax, rsp
mov qword [rsp + 0x10100], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x14005217b
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x140052bd2
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140052bd2
xor ebp, ebp
mov esi, ebp
cmp dword [rax + 0x54c], ebp
jbe 0x1400521e9
mov rdi, rbp
nop
nop
nop
lea rcx, [rax + 0x540]
mov edx, esi
call fcn.1400d3fe0
test eax, eax
je 0x1400521d3
mov rcx, qword [rbx + 0x10]
movzx eax, word [rdi + rcx + 0x57c]
bt ax, 9
jb 0x1400521d3
test al, 8
je 0x1400521d3
test byte [rdi + rcx + 0x574], 1
je 0x1400521f1
add esi, 1
add rdi, 0xa4
mov rax, qword [rbx + 0x10]
cmp esi, dword [rax + 0x54c]
jb 0x1400521a0
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x40
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x84], 0x11
jae 0x140052207
mov rcx, rbx
call fcn.140053220
mov rax, qword [rbx + 0x10]
test byte [rax + 0xb], 1
je 0x140052219
mov rcx, rbx
call fcn.140054070
mov esi, ebp
mov rax, qword [rbx + 0x10]
mov rdx, qword [rax + 0x1a20]
lea r13, [0x140260b08]
mov r14d, 1
test rdx, rdx
je 0x1400523fc
nop
mov rcx, rdx
test rdx, rdx
je 0x1400523f6
mov rdx, qword [rdx]
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x1400522c3
mov eax, dword [rcx + 0xb8]
cmp eax, 8
je 0x140052268
cmp eax, 9
jne 0x1400522b0
cmp dword [rcx + 0x48], ebp
je 0x1400522b0
mov eax, dword [rcx + 0x17c]
bt eax, 0xc
jb 0x14005229a
mov edi, dword [rcx + 0x180]
bt edi, 0x1d
jb 0x14005229a
test byte [rcx + 0x184], r14b
je 0x140052294
bt eax, 0xb
jb 0x14005229a
test dil, 0x40
je 0x1400522b0
test r14b, al
jne 0x1400522a5
bt eax, 0xa
jae 0x1400522b0
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x20000
mov eax, dword [rcx + 0x180]
test r14b, al
je 0x1400522c3
bt eax, 0x14
cmovb esi, r14d
test rdx, rdx
jne 0x140052240
test esi, esi
je 0x1400523fc
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x48], rax
call fcn.1401e9268
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140052307
mov ecx, 0x80004005
call fcn.140003c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
test r13, 0xffffffffffff0000
jne 0x140052344
movzx edi, r13w
mov ecx, edi
call fcn.1401eb134
test rax, rax
je 0x140052365
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400074b0
jmp 0x140052365
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0x68]
call fcn.140007720
nop
call fcn.1401e9268
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140052384
mov ecx, 0x80004005
call fcn.140003c70
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 0x1400523c7
movzx edi, dx
mov ecx, edi
call fcn.1401eb134
test rax, rax
je 0x1400523e5
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1400074b0
jmp 0x1400523e5
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x58]
call fcn.140007720
nop
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x58]
call fcn.1400435a0
jmp 0x1400523fc
call fcn.1401e7838
int3
mov rax, qword [rbx + 0x10]
lea r12, [0x140000000]
bt dword [rax + 0x34], 8
jae 0x140052513
xor r9d, r9d
lea r8, str.SpdifFinished
lea rdx, str.DefLevel
lea rcx, [0x1403149a0]
call fcn.1401ee9b4
test eax, eax
jne 0x140052513
mov rax, qword [rbx + 0x10]
mov rcx, qword [rax + 0x1a20]
test rcx, rcx
je 0x140052513
nop
nop
mov rax, rcx
test rcx, rcx
je 0x14005250d
mov rcx, qword [rcx]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140052471
cmp dword [rax + 0xb8], 8
je 0x14005247c
test rcx, rcx
je 0x140052513
jmp 0x140052450
mov rax, qword [rax + 0xc8]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x140052513
cmp dword [rcx + 0x3c], 0
je 0x140052513
lea rdx, [rsp + 0xc0]
mov rax, qword [r12 + 0x25bb28]
mov qword [rdx], rax
mov rax, qword [r12 + 0x25bb30]
mov qword [rdx + 8], rax
lea r8, [rsp + 0xc0]
mov edx, 0x32
call fcn.140130e50
test eax, eax
jne 0x1400524ee
lea r9, str.Set_SPDIF_Vol_to_50_failed.
lea r8, str.Warning
lea rdx, str.DefLevel
lea rcx, [0x1403149a0]
call fcn.1401eeb14
jmp 0x140052513
mov r9d, r14d
lea r8, str.SpdifFinished
lea rdx, str.DefLevel
lea rcx, [0x1403149a0]
call fcn.1401eea54
jmp 0x140052513
call fcn.1401e7838
int3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0xac], 0x1a
jae 0x140052580
add rdi, 0x540
je 0x140052580
movsxd rdx, dword [rdi + 0x1c]
cmp edx, 0xffffffff
je 0x14005255b
mov rax, rdx
imul rax, rax, 0xa4
cmp dword [rax + rdi + 0xc4], 0
je 0x14005255b
mov rcx, rdi
call fcn.1400d44b0
movsxd rdx, dword [rdi + 0x24]
cmp edx, 0xffffffff
je 0x140052580
mov rax, rdx
imul rax, rax, 0xa4
cmp dword [rax + rdi + 0xc4], 0
je 0x140052580
mov rcx, rdi
call fcn.1400d44b0
xor edx, edx
xor ecx, ecx
call fcn.1400600d0
xor edx, edx
mov ecx, r14d
call fcn.1400600d0
mov dword [rsp + 0xd0], ebp
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0xd4]
call fcn.1402197d0
lea rcx, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140052820
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x100]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0xfc], 0x5c
jne 0x1400525fd
mov word [rsp + rcx*2 + 0xfc], ax
cmp word [rsp + 0xd0], 9
jne 0x140052623
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call fcn.1402175a0
jmp 0x14005263c
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call fcn.1402175a0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
call fcn.1401e9268
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140052665
mov ecx, 0x80004005
call fcn.140003c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x100]
lea rax, [rsp + 0x100]
test rax, 0xffffffffffff0000
jne 0x1400526b0
movzx edi, cx
mov ecx, edi
call fcn.1401eb134
test rax, rax
je 0x1400526db
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400074b0
jmp 0x1400526db
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x100]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rsp + 0x100]
lea rcx, [rsp + 0x40]
call fcn.140007720
nop
xor edx, edx
mov rdi, r13
mov rax, qword [rsp + 0x40]
mov rsi, rax
mov rcx, r14
repe cmpsw word [rsi], word [rdi]
je 0x1400526f5
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne cl
test cl, cl
jne 0x14005271c
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14005274f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14005274f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400527e1
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14005274f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0x100]
call fcn.1402197d0
lea rdx, [rsp + 0x100]
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 0x140052802
lea r8, str.RealtekAudioAP
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call fcn.1402175a0
cmp word [rsp + 0xd0], 9
jne 0x1400527c6
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call fcn.1402175a0
jmp 0x140052802
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0x100]
call fcn.1402175a0
jmp 0x140052802
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140052802
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140052820
mov rax, qword [rbx + 0x10]
or dword [rax + 8], 0x20000000
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xb8], 0xa
jae 0x140052982
mov dword [rsp + 0x78], ebp
mov rcx, qword [rax + 0x4c8]
test rcx, rcx
je 0x140052982
lea rdx, [rsp + 0xa0]
mov rax, qword [r12 + 0x25bab8]
mov qword [rdx], rax
mov rax, qword [r12 + 0x25bac0]
mov qword [rdx + 8], rax
mov dword [rsp + 0x80], ebp
xor eax, eax
mov dword [rsp + 0x84], eax
mov dword [rsp + 0x88], eax
mov dword [rsp + 0x8c], eax
mov dword [rsp + 0x90], eax
mov dword [rsp + 0x94], eax
mov dword [rsp + 0x50], ebp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
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 0x140052982
lea rdx, [rsp + 0x80]
lea rax, [rsp + 0xa0]
mov rcx, qword [rax]
mov qword [rdx], rcx
mov rcx, qword [rax + 8]
mov qword [rdx + 8], rcx
mov dword [rsp + 0x94], 2
mov dword [rsp + 0x90], 0x21
mov dword [rsp + 0x50], ebp
mov qword [rsp + 0x38], rbp
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x18
lea r8, [rsp + 0x80]
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 0x140052982
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x60]
call fcn.14003bed0
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140052982
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx + 0x10]
mov ecx, dword [rax + 0xf8]
test cl, 4
je 0x140052aba
test cl, 0x40
jne 0x140052aba
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
call fcn.1401e9268
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x1400529d1
mov ecx, 0x80004005
call fcn.140003c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
test r13, 0xffffffffffff0000
jne 0x140052a0e
movzx edi, r13w
mov ecx, edi
call fcn.1401eb134
test rax, rax
je 0x140052a2f
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.1400074b0
jmp 0x140052a2f
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0x70]
call fcn.140007720
nop
call fcn.1401e9268
mov rcx, rax
test rax, rax
setne bpl
test ebp, ebp
jne 0x140052a4d
mov ecx, 0x80004005
call fcn.140003c70
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, str.FMAPP.exe
test rdx, 0xffffffffffff0000
jne 0x140052a8d
movzx edi, dx
mov ecx, edi
call fcn.1401eb134
test rax, rax
je 0x140052aab
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.1400074b0
jmp 0x140052aab
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x48]
call fcn.140007720
nop
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call fcn.1400435a0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xc], 0xd
jae 0x140052acd
mov rcx, rbx
call fcn.140056df0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x18], 0xa
jae 0x140052b7b
mov rax, qword [rax + 0x1a20]
test rax, rax
je 0x140052b7b
nop
mov rdi, rax
test rax, rax
je 0x140052b75
mov rax, qword [rax]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x140052b0d
cmp dword [rdi + 0xb8], 1
je 0x140052b14
test rax, rax
je 0x140052b7b
jmp 0x140052af0
cmp dword [rdi + 0xb8], 1
jne 0x140052b7b
mov rdi, qword [rdi + 0x100]
test rdi, rdi
je 0x140052b7b
nop
nop
mov rsi, rdi
test rdi, rdi
je 0x140052b6f
mov rdi, qword [rdi]
mov rsi, qword [rsi + 0x10]
test rsi, rsi
je 0x140052b52
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x28]
cmp eax, 0x14
je 0x140052b59
test rdi, rdi
je 0x140052b7b
jmp 0x140052b30
mov rcx, rsi
call fcn.14017a100
test eax, eax
je 0x140052b7b
mov rcx, rsi
call fcn.14017a950
jmp 0x140052b7b
call fcn.1401e7838
int3
call fcn.1401e7838
int3
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0x38], 0x1f
jae 0x140052bd2
mov rax, qword [rdi + 0x19f8]
bt dword [rax + 0x38], 0x1f
jae 0x140052bd2
mov r9d, r14d
lea r8, str.AutoSelectChannelByJackConf
lea rdx, str.General
lea rcx, [0x1403149a0]
call fcn.1401ee9b4
test eax, eax
je 0x140052bd2
mov rax, qword [rdi + 0x19f8]
bt dword [rax + 0x190], 8
jae 0x140052bd2
lea rcx, [rdi + 0x540]
call fcn.1400d60c0
mov rcx, qword [rsp + 0x10100]
xor rcx, rsp
call fcn.140216200
lea r11, [rsp + 0x10110]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret