Function at 0x140117f70
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 r12
push r13
mov eax, 0x10100
call fcn.140167340
sub rsp, rax
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rsp + 0x10128], rbx
mov qword [rsp + 0x10130], rbp
mov qword [rsp + 0x10138], rsi
mov rax, qword [0x1401ea158]
xor rax, rsp
mov qword [rsp + 0x100f0], rax
mov rbx, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x140117fd0
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x140118801
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140118801
xor ebp, ebp
mov esi, ebp
cmp dword [rax + 0x554], ebp
jbe 0x140118039
mov rdi, rbp
nop
lea rcx, [rax + 0x540]
mov edx, esi
call fcn.1400ad610
test eax, eax
je 0x140118023
mov rcx, qword [rbx + 0x10]
movzx eax, word [rdi + rcx + 0x608]
bt ax, 9
jb 0x140118023
test al, 8
je 0x140118023
test byte [rdi + rcx + 0x600], 1
je 0x140118041
add esi, 1
add rdi, 0xac
mov rax, qword [rbx + 0x10]
cmp esi, dword [rax + 0x554]
jb 0x140117ff0
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x40
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xa8], 0x11
jae 0x140118057
mov rcx, rbx
call fcn.140118d80
mov rax, qword [rbx + 0x10]
test byte [rax + 0x2f], 1
je 0x140118069
mov rcx, rbx
call fcn.140119d50
mov esi, ebp
mov rax, qword [rbx + 0x10]
mov rdx, qword [rax + 0x1ba0]
lea r13, [0x14017f438]
mov r12d, 1
test rdx, rdx
je 0x14011824f
nop
mov rcx, rdx
test rdx, rdx
je 0x140118249
mov rdx, qword [rdx]
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x140118116
mov eax, dword [rcx + 0x1d0]
cmp eax, 8
je 0x1401180b8
cmp eax, 9
jne 0x140118103
cmp dword [rcx + 0x160], ebp
je 0x140118103
mov eax, dword [rcx + 0x30c]
bt eax, 0xc
jb 0x1401180ed
mov edi, dword [rcx + 0x310]
bt edi, 0x1d
jb 0x1401180ed
test byte [rcx + 0x314], r12b
je 0x1401180e7
bt eax, 0xb
jb 0x1401180ed
test dil, 0x40
je 0x140118103
test r12b, al
jne 0x1401180f8
bt eax, 0xa
jae 0x140118103
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000
mov eax, dword [rcx + 0x310]
test r12b, al
je 0x140118116
bt eax, 0x14
cmovb esi, r12d
test rdx, rdx
jne 0x140118090
test esi, esi
je 0x14011824f
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x48], rax
call fcn.14012a060
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x14011815a
mov ecx, 0x80004005
call fcn.140002cb0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
test r13, 0xffffffffffff0000
jne 0x140118197
movzx edi, r13w
mov ecx, edi
call fcn.140138f84
test rax, rax
je 0x1401181b8
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140004c30
jmp 0x1401181b8
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.140003210
nop
call fcn.14012a060
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x1401181d7
mov ecx, 0x80004005
call fcn.140002cb0
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 0x14011821a
movzx edi, dx
mov ecx, edi
call fcn.140138f84
test rax, rax
je 0x140118238
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140004c30
jmp 0x140118238
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.140003210
nop
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x58]
call fcn.1400733d0
jmp 0x14011824f
call fcn.140129ec4
int3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0xd0], 0x1a
jae 0x1401182b6
add rdi, 0x540
je 0x1401182b6
movsxd rdx, dword [rdi + 0x28]
cmp edx, 0xffffffff
je 0x140118294
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x140118294
mov rcx, rdi
call fcn.1400adb00
movsxd rdx, dword [rdi + 0x30]
cmp edx, 0xffffffff
je 0x1401182b6
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x1401182b6
mov rcx, rdi
call fcn.1400adb00
xor edx, edx
xor ecx, ecx
call fcn.140079190
xor edx, edx
mov ecx, r12d
call fcn.140079190
mov dword [rsp + 0xb8], ebp
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0xbc]
call fcn.140148fe0
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 0x140118556
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xf0]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0xec], 0x5c
jne 0x140118333
mov word [rsp + rcx*2 + 0xec], ax
cmp word [rsp + 0xb8], 9
jne 0x140118359
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146a50
jmp 0x140118372
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146a50
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
call fcn.14012a060
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x14011839b
mov ecx, 0x80004005
call fcn.140002cb0
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 0x1401183e6
movzx edi, cx
mov ecx, edi
call fcn.140138f84
test rax, rax
je 0x140118411
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140004c30
jmp 0x140118411
xor eax, eax
or rcx, 0xffffffffffffffff
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.140003210
nop
xor edx, edx
mov rdi, r13
mov rax, qword [rsp + 0x40]
mov rsi, rax
mov rcx, r12
repe cmpsw word [rsi], word [rdi]
je 0x14011842b
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne cl
test cl, cl
jne 0x140118452
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140118485
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118485
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140118517
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140118485
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.140148fe0
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 0x140118538
lea r8, str.RealtekAudioAP
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146a50
cmp word [rsp + 0xb8], 9
jne 0x1401184fc
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146a50
jmp 0x140118538
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146a50
jmp 0x140118538
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140118538
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 0x140118556
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000000
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xdc], 0xa
jae 0x1401186b6
mov dword [rsp + 0x78], ebp
mov rcx, qword [0x140206e20]
test rcx, rcx
je 0x1401186b6
mov dword [rsp + 0x50], ebp
lea rdx, [rsp + 0xa0]
mov rax, qword [0x14018e398]
mov qword [rdx], rax
mov rax, qword [0x14018e3a0]
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 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 0x1401186b6
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 0x1401186b6
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x60]
call fcn.140070880
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1401186b6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rbx + 0x10]
mov ecx, dword [rax + 0x11c]
test cl, 4
je 0x1401187ee
test cl, 0x40
jne 0x1401187ee
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
call fcn.14012a060
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140118705
mov ecx, 0x80004005
call fcn.140002cb0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
test r13, 0xffffffffffff0000
jne 0x140118742
movzx edi, r13w
mov ecx, edi
call fcn.140138f84
test rax, rax
je 0x140118763
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140004c30
jmp 0x140118763
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.140003210
nop
call fcn.14012a060
mov rcx, rax
test rax, rax
setne bpl
test ebp, ebp
jne 0x140118781
mov ecx, 0x80004005
call fcn.140002cb0
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 0x1401187c1
movzx edi, dx
mov ecx, edi
call fcn.140138f84
test rax, rax
je 0x1401187df
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140004c30
jmp 0x1401187df
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.140003210
nop
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x48]
call fcn.1400733d0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x30], 0xd
jae 0x140118801
mov rcx, rbx
call fcn.14011c220
mov rcx, qword [rsp + 0x100f0]
xor rcx, rsp
call fcn.140144dc0
lea r11, [rsp + 0x10100]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret