Function at 0x140040a10
Capabilities:
Get common file path
Get program files directory

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xffa0]
mov eax, 0x100a0
call fcn.1402ed7b0
sub rsp, rax
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x100f0], rbx
mov rax, qword [0x14044f8c0]
xor rax, rsp
mov qword [rbp + 0xff90], rax
mov rsi, rdx
mov r14, rcx
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rdx
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x140040d9c
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rbx, [0x140393240]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.1400168b0
mov rdi, 0xffffffffffffffff
test al, al
jne 0x140040ac0
mov rax, rdi
inc rax
cmp word [rbx + rax*2], 0
jne 0x140040aa5
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.140016ad0
nop
xor r13d, r13d
mov r12d, r13d
mov edx, 0x7fff
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140040be2
lea rcx, [rbp - 0x70]
mov rax, rdi
lea rax, [rax + 1]
cmp word [rcx + rax*2], r13w
jne 0x140040ae4
cmp word [rbp + rax*2 - 0x72], 0x5c
jne 0x140040b11
lea rax, [rax*2 - 2]
cmp rax, 0xfffe
jae 0x140040d90
mov word [rbp + rax - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], r13w
jne 0x140040b20
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x30]
call fcn.140016ad0
lea rdx, [0x140393ef0]
mov rax, rdi
inc rax
cmp word [rdx + rax*2], r13w
jne 0x140040b45
mov r8d, eax
lea rcx, [rsp + 0x30]
call fcn.140016630
mov rdx, qword [r14]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140016630
mov rbx, qword [rsp + 0x30]
lea rcx, [rbx - 0x18]
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rcx, [rsp + 0x48]
call fcn.14003fd40
test eax, eax
je 0x140040be7
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov rcx, qword [rsi]
sub rcx, 0x18
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x50], rax
lea rcx, [rbx - 0x18]
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x58]
call fcn.14003d4d0
mov r12d, eax
test eax, eax
jne 0x140040d12
jmp 0x140040be7
mov rbx, qword [rsp + 0x30]
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rbp - 0x70]
call fcn.1402ef020
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140040d12
lea rcx, [rbp - 0x70]
mov rax, rdi
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x140040c22
cmp word [rbp + rax*2 - 0x72], 0x5c
jne 0x140040c4f
lea rax, [rax*2 - 2]
cmp rax, 0xfffe
jae 0x140040d96
mov word [rbp + rax - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140040c56
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x30]
call fcn.140016ad0
lea rdx, str.RealtekAudioAP_
mov rax, rdi
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x140040c80
mov r8d, eax
lea rcx, [rsp + 0x30]
call fcn.140016630
mov rdx, qword [r14]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140016630
mov rbx, qword [rsp + 0x30]
lea rcx, [rbx - 0x18]
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x60]
call fcn.14003fd40
test eax, eax
je 0x140040d12
lea rax, [rsp + 0x40]
mov qword [rbp - 0x80], rax
mov rcx, qword [rsi]
sub rcx, 0x18
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rbx - 0x18]
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x38], rax
xor r8d, r8d
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x38]
call fcn.14003d4d0
mov r12d, eax
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040d2c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040d49
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140040d63
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
mov rcx, qword [rbp + 0xff90]
xor rcx, rsp
call fcn.1402ecc20
mov rbx, qword [rsp + 0x100f0]
add rsp, 0x100a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1402ed414
nop
call fcn.1402ed414
nop
mov ecx, 0x80004005
call fcn.140012800
int3