Function at 0x14012fea0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory
Get system information on windows

Disassembly:
push rdi
push r13
push r14
mov eax, 0x100c0
call fcn.140180a70
sub rsp, rax
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x100e8], rbx
mov qword [rsp + 0x100f0], rbp
mov qword [rsp + 0x100f8], rsi
mov rax, qword [0x14020e318]
xor rax, rsp
mov qword [rsp + 0x100b0], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x14012fefd
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x1401304f4
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1401304f4
xor esi, esi
cmp dword [rax + 0x56c], esi
jbe 0x14012ff69
xor edi, edi
nop
nop
nop
lea rcx, [rax + 0x558]
mov edx, esi
call fcn.1400bb490
test eax, eax
je 0x14012ff53
mov rcx, qword [rbx + 0x10]
movzx eax, word [rcx + rdi + 0x620]
bt ax, 9
jb 0x14012ff53
test al, 8
je 0x14012ff53
test byte [rcx + rdi + 0x618], 1
je 0x14012ff71
add esi, 1
add rdi, 0xac
mov rax, qword [rbx + 0x10]
cmp esi, dword [rax + 0x56c]
jb 0x14012ff20
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x40
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xa8], 0x11
jae 0x14012ff87
mov rcx, rbx
call fcn.140130aa0
mov rax, qword [rbx + 0x10]
test byte [rax + 0x2f], 1
je 0x14012ff99
mov rcx, rbx
call fcn.140131b00
xor esi, esi
mov rax, qword [rbx + 0x10]
mov rdx, qword [rax + 0x1bd0]
lea r13, [0x14019bd68]
or rbp, 0xffffffffffffffff
lea r14d, [rsi + 1]
test rdx, rdx
je 0x14013017e
nop
mov rcx, rdx
test rdx, rdx
je 0x140130178
mov rdx, qword [rdx]
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x140130047
mov eax, dword [rcx + 0x1d8]
cmp eax, 8
je 0x14012ffe8
cmp eax, 9
jne 0x140130034
cmp dword [rcx + 0x168], 0
je 0x140130034
mov eax, dword [rcx + 0x314]
bt eax, 0xc
jb 0x14013001e
mov edi, dword [rcx + 0x318]
bt edi, 0x1d
jb 0x14013001e
test byte [rcx + 0x31c], r14b
je 0x140130018
bt eax, 0xb
jb 0x14013001e
test dil, 0x40
je 0x140130034
test r14b, al
jne 0x140130029
bt eax, 0xa
jae 0x140130034
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000
mov eax, dword [rcx + 0x318]
test r14b, al
je 0x140130047
bt eax, 0x14
cmovb esi, r14d
test rdx, rdx
jne 0x14012ffc0
test esi, esi
je 0x14013017e
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
call fcn.14013e120
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x14013008b
mov ecx, 0x80004005
call fcn.140001c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
test r13, 0xffffffffffff0000
jne 0x1401300c8
movzx edi, r13w
mov ecx, edi
call fcn.14014c5c0
test rax, rax
je 0x1401300e8
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140005140
jmp 0x1401300e8
xor eax, eax
mov rcx, rbp
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0x50]
call fcn.1400038f0
nop
call fcn.14013e120
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140130107
mov ecx, 0x80004005
call fcn.140001c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, str.RAVBg64.exe
test rdx, 0xffffffffffff0000
jne 0x14013014a
movzx edi, dx
mov ecx, edi
call fcn.14014c5c0
test rax, rax
je 0x140130167
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140005140
jmp 0x140130167
xor eax, eax
mov rcx, rbp
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x48]
call fcn.1400038f0
nop
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x48]
call fcn.140075040
jmp 0x14013017e
call fcn.14013de24
int3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0xd0], 0x1a
jae 0x1401301e5
add rdi, 0x558
je 0x1401301e5
movsxd rdx, dword [rdi + 0x28]
cmp edx, 0xffffffff
je 0x1401301c3
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x1401301c3
mov rcx, rdi
call fcn.1400bba20
movsxd rdx, dword [rdi + 0x30]
cmp edx, 0xffffffff
je 0x1401301e5
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x1401301e5
mov rcx, rdi
call fcn.1400bba20
xor edx, edx
xor ecx, ecx
call fcn.14007bff0
xor edx, edx
mov ecx, r14d
call fcn.14007bff0
mov dword [rsp + 0x80], 0
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0x84]
call fcn.1401601f0
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x14013046e
xor eax, eax
mov rcx, rbp
lea rdi, [rsp + 0xb0]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0xac], 0x5c
jne 0x140130265
mov word [rsp + rcx*2 + 0xac], ax
cmp word [rsp + 0x80], 9
jne 0x14013028b
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call fcn.14015dd00
jmp 0x1401302a4
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call fcn.14015dd00
lea rax, [rsp + 0x40]
mov qword [rsp + 0x58], rax
call fcn.14013e120
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x1401302cd
mov ecx, 0x80004005
call fcn.140001c70
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0xb0]
lea rax, [rsp + 0xb0]
test rax, 0xffffffffffff0000
jne 0x140130318
movzx edi, cx
mov ecx, edi
call fcn.14014c5c0
test rax, rax
je 0x140130342
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140005140
jmp 0x140130342
xor eax, eax
mov rcx, rbp
lea rdi, [rsp + 0xb0]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x40]
call fcn.1400038f0
nop
mov rdi, r13
mov rax, qword [rsp + 0x40]
mov rsi, rax
mov rcx, r14
repe cmpsw word [rsi], word [rdi]
jne 0x140130370
lea rdx, [rax - 0x18]
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x1401303a0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1401303a0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140130432
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x1401303a0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0xb0]
call fcn.1401601f0
lea rdx, [rsp + 0xb0]
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 0x140130450
lea r8, str.RealtekAudioAP
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call fcn.14015dd00
cmp word [rsp + 0x80], 9
jne 0x140130417
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call fcn.14015dd00
jmp 0x140130450
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xb0]
call fcn.14015dd00
jmp 0x140130450
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x140130450
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14013046e
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000000
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xdc], 0xa
jae 0x1401304e1
mov dword [rsp + 0x58], 0
mov rcx, qword [0x14022c510]
test rcx, rcx
je 0x1401304e1
mov dword [rsp + 0x60], 0
lea rdx, [rsp + 0x70]
mov rax, qword [0x1401ab248]
mov qword [rdx], rax
mov rax, qword [0x1401ab250]
mov qword [rdx + 8], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, r14d
mov r8d, 0x21
lea rdx, [rsp + 0x70]
call fcn.14008acf0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x30], 0xd
jae 0x1401304f4
mov rcx, rbx
call fcn.140134310
mov rcx, qword [rsp + 0x100b0]
xor rcx, rsp
call fcn.14015b6f0
lea r11, [rsp + 0x100c0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rdi
ret