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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xff80]
mov eax, 0x10080
call fcn.1402ed7b0
sub rsp, rax
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x100c0], rbx
mov rax, qword [0x14044f8c0]
xor rax, rsp
mov qword [rbp + 0xff70], rax
mov r14, rdx
mov r15, rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rdx
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x140041070
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 0x140040e5c
mov rax, rdi
inc rax
cmp word [rbx + rax*2], 0
jne 0x140040e41
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.140016ad0
nop
xor esi, esi
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0x70]
call fcn.1402ef020
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140040fec
lea rcx, [rsp + 0x70]
mov rax, rdi
nop dword [rax + rax]
lea rax, [rax + 1]
cmp word [rcx + rax*2], si
jne 0x140040ea0
cmp word [rsp + rax*2 + 0x6e], 0x5c
jne 0x140040ecb
lea rax, [rax*2 - 2]
cmp rax, 0xfffe
jae 0x14004106a
mov word [rsp + rax + 0x70], si
lea rcx, [rsp + 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], si
jne 0x140040ed3
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140016ad0
lea rdx, str.RealtekAudioHDA_
mov rax, rdi
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], si
jne 0x140040f00
mov r8d, eax
lea rcx, [rsp + 0x30]
call fcn.140016630
mov rdx, qword [r15]
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 + 0x40], rax
lea rcx, [rsp + 0x40]
call fcn.14003fd40
test eax, eax
jne 0x140040fa5
mov eax, edi
lock xadd dword [rbx - 8], eax
sub eax, 1
jg 0x140040f67
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r15]
sub rdx, 0x18
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040f84
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140040f9e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140041044
lea rax, [rsp + 0x48]
mov qword [rsp + 0x68], rax
mov rcx, qword [r14]
sub rcx, 0x18
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rcx, [rbx - 0x18]
call fcn.140012250
add rax, 0x18
mov qword [rsp + 0x38], rax
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x38]
call fcn.14003d4d0
mov esi, eax
jmp 0x140040ff1
mov rbx, qword [rsp + 0x30]
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14004100b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r15]
sub rdx, 0x18
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140041028
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140041042
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
mov rcx, qword [rbp + 0xff70]
xor rcx, rsp
call fcn.1402ecc20
mov rbx, qword [rsp + 0x100c0]
add rsp, 0x10080
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.1402ed414
nop
mov ecx, 0x80004005
call fcn.140012800
int3