Function at 0x140117970
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.140166d30
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 0x1401179d0
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x140118201
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140118201
xor ebp, ebp
mov esi, ebp
cmp dword [rax + 0x554], ebp
jbe 0x140117a39
mov rdi, rbp
nop
lea rcx, [rax + 0x540]
mov edx, esi
call fcn.1400ad440
test eax, eax
je 0x140117a23
mov rcx, qword [rbx + 0x10]
movzx eax, word [rdi + rcx + 0x608]
bt ax, 9
jb 0x140117a23
test al, 8
je 0x140117a23
test byte [rdi + rcx + 0x600], 1
je 0x140117a41
add esi, 1
add rdi, 0xac
mov rax, qword [rbx + 0x10]
cmp esi, dword [rax + 0x554]
jb 0x1401179f0
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x40
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xa8], 0x11
jae 0x140117a57
mov rcx, rbx
call fcn.140118780
mov rax, qword [rbx + 0x10]
test byte [rax + 0x2f], 1
je 0x140117a69
mov rcx, rbx
call fcn.140119750
mov esi, ebp
mov rax, qword [rbx + 0x10]
mov rdx, qword [rax + 0x1ba0]
lea r13, [0x14017f438]
mov r12d, 1
test rdx, rdx
je 0x140117c4f
nop
mov rcx, rdx
test rdx, rdx
je 0x140117c49
mov rdx, qword [rdx]
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x140117b16
mov eax, dword [rcx + 0x1d0]
cmp eax, 8
je 0x140117ab8
cmp eax, 9
jne 0x140117b03
cmp dword [rcx + 0x160], ebp
je 0x140117b03
mov eax, dword [rcx + 0x30c]
bt eax, 0xc
jb 0x140117aed
mov edi, dword [rcx + 0x310]
bt edi, 0x1d
jb 0x140117aed
test byte [rcx + 0x314], r12b
je 0x140117ae7
bt eax, 0xb
jb 0x140117aed
test dil, 0x40
je 0x140117b03
test r12b, al
jne 0x140117af8
bt eax, 0xa
jae 0x140117b03
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000
mov eax, dword [rcx + 0x310]
test r12b, al
je 0x140117b16
bt eax, 0x14
cmovb esi, r12d
test rdx, rdx
jne 0x140117a90
test esi, esi
je 0x140117c4f
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x48], rax
call fcn.140129a50
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140117b5a
mov ecx, 0x80004005
call fcn.140002d80
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
test r13, 0xffffffffffff0000
jne 0x140117b97
movzx edi, r13w
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x140117bb8
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140004d70
jmp 0x140117bb8
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.1400032e0
nop
call fcn.140129a50
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140117bd7
mov ecx, 0x80004005
call fcn.140002d80
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 0x140117c1a
movzx edi, dx
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x140117c38
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140004d70
jmp 0x140117c38
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.1400032e0
nop
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x58]
call fcn.1400731f0
jmp 0x140117c4f
call fcn.1401298b4
int3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rdi, qword [rbx + 0x10]
bt dword [rdi + 0xd0], 0x1a
jae 0x140117cb6
add rdi, 0x540
je 0x140117cb6
movsxd rdx, dword [rdi + 0x28]
cmp edx, 0xffffffff
je 0x140117c94
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x140117c94
mov rcx, rdi
call fcn.1400ad930
movsxd rdx, dword [rdi + 0x30]
cmp edx, 0xffffffff
je 0x140117cb6
lea rax, [rdx + 2]
imul rax, rax, 0xac
cmp dword [rax + rdi], 0
je 0x140117cb6
mov rcx, rdi
call fcn.1400ad930
xor edx, edx
xor ecx, ecx
call fcn.140078f40
xor edx, edx
mov ecx, r12d
call fcn.140078f40
mov dword [rsp + 0xb8], ebp
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0xbc]
call fcn.1401489d0
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 0x140117f56
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 0x140117d33
mov word [rsp + rcx*2 + 0xec], ax
cmp word [rsp + 0xb8], 9
jne 0x140117d59
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146440
jmp 0x140117d72
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146440
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
call fcn.140129a50
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140117d9b
mov ecx, 0x80004005
call fcn.140002d80
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 0x140117de6
movzx edi, cx
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x140117e11
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140004d70
jmp 0x140117e11
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.1400032e0
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 0x140117e2b
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne cl
test cl, cl
jne 0x140117e52
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140117e85
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140117e85
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140117f17
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140117e85
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.1401489d0
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 0x140117f38
lea r8, str.RealtekAudioAP
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146440
cmp word [rsp + 0xb8], 9
jne 0x140117efc
lea r8, str.RTKVAA64.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146440
jmp 0x140117f38
lea r8, str.RTKVADDA.EXE
mov edx, 0x7fff
lea rcx, [rsp + 0xf0]
call fcn.140146440
jmp 0x140117f38
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140117f38
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 0x140117f56
mov rax, qword [rbx + 0x10]
or dword [rax + 0x2c], 0x20000000
mov rax, qword [rbx + 0x10]
bt dword [rax + 0xdc], 0xa
jae 0x1401180b6
mov dword [rsp + 0x78], ebp
mov rcx, qword [0x140206e20]
test rcx, rcx
je 0x1401180b6
mov dword [rsp + 0x50], ebp
lea rdx, [rsp + 0xa0]
mov rax, qword [0x14018e388]
mov qword [rdx], rax
mov rax, qword [0x14018e390]
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 0x1401180b6
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 0x1401180b6
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x60]
call fcn.1400706a0
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1401180b6
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 0x1401181ee
test cl, 0x40
jne 0x1401181ee
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
call fcn.140129a50
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x140118105
mov ecx, 0x80004005
call fcn.140002d80
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
test r13, 0xffffffffffff0000
jne 0x140118142
movzx edi, r13w
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x140118163
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140004d70
jmp 0x140118163
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.1400032e0
nop
call fcn.140129a50
mov rcx, rax
test rax, rax
setne bpl
test ebp, ebp
jne 0x140118181
mov ecx, 0x80004005
call fcn.140002d80
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 0x1401181c1
movzx edi, dx
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x1401181df
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140004d70
jmp 0x1401181df
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.1400032e0
nop
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x48]
call fcn.1400731f0
mov rax, qword [rbx + 0x10]
bt dword [rax + 0x30], 0xd
jae 0x140118201
mov rcx, rbx
call fcn.14011bc20
mov rcx, qword [rsp + 0x100f0]
xor rcx, rsp
call fcn.1401447b0
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