Function at 0x1400459b0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x100b0
call fcn.14024ccf0
sub rsp, rax
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x10100], rbx
mov rax, qword [0x14031eda0]
xor rax, rsp
mov qword [rsp + 0x100a0], rax
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], rdx
call fcn.1401ff164
mov rcx, rax
xor edx, edx
test rax, rax
setne dl
test edx, edx
jne 0x140045a22
mov ecx, 0x80004005
call fcn.140002bc0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x30], rsi
lea rdx, [0x140275388]
or r12, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x140045a6b
movzx edi, dx
mov ecx, edi
call fcn.140200fbc
test rax, rax
je 0x140045a8c
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.1401bacf0
mov rsi, qword [rsp + 0x30]
jmp 0x140045a8c
xor eax, eax
mov rcx, r12
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x30]
call fcn.14000b770
mov rsi, qword [rsp + 0x30]
xor r15d, r15d
mov edx, 0x7fff
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140045f17
xor eax, eax
mov rcx, r12
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0x9c], 0x5c
jne 0x140045ad0
mov word [rsp + rcx*2 + 0x9c], ax
mov rcx, r12
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x140045b4b
lea rdx, [rsi - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140045bd4
cmp dword [rdx + 0x10], eax
jge 0x140045b1c
cmp dword [rsi - 0xc], eax
jge 0x140045b11
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov dword [rsi - 0x10], eax
mov word [rsi], ax
jmp 0x140045bd4
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140045b34
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x30], rsi
jmp 0x140045bd4
mov ebx, dword [rsi - 0x10]
lea rbp, [rsp + 0xa0]
sub rbp, rsi
sar rbp, 1
mov ecx, 1
sub ecx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, ecx
jge 0x140045b7e
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbp, rbx
ja 0x140045b9e
movsxd rax, edi
lea rbx, [rax + rax]
lea r8, [rsi + rbp*2]
mov r9, rbx
mov rdx, rbx
mov rcx, rsi
call fcn.14022c8a0
jmp 0x140045bbb
movsxd rax, edi
lea rbx, [rax + rax]
mov r9, rbx
lea r8, [rsp + 0xa0]
mov rdx, rbx
mov rcx, rsi
call fcn.14022ba40
test edi, edi
js 0x140045f0c
cmp edi, dword [rsi - 0xc]
jg 0x140045f0c
mov dword [rsi - 0x10], edi
mov word [rbx + rsi], r15w
xor eax, eax
mov rcx, r12
lea rbp, [0x140279558]
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
lea r14, [rcx - 1]
mov rbx, rbp
sub rbx, rsi
sar rbx, 1
mov r13d, dword [rsi - 0x10]
lea edi, [r13 + rcx - 1]
mov edx, 1
sub edx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, edx
jge 0x140045c21
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbx, r13
ja 0x140045c2a
lea rbp, [rsi + rbx*2]
movsxd rdx, r14d
add rdx, rdx
lea rcx, [rsi + r13*2]
mov r9, rdx
mov r8, rbp
call fcn.14022ba40
test edi, edi
js 0x140045f01
cmp edi, dword [rsi - 0xc]
jg 0x140045f01
mov dword [rsi - 0x10], edi
movsxd rax, edi
mov word [rsi + rax*2], r15w
mov rbp, qword [rsp + 0x40]
mov rbp, qword [rbp]
movsxd r14, dword [rbp - 0x10]
mov rbx, rbp
sub rbx, rsi
sar rbx, 1
mov r13d, dword [rsi - 0x10]
lea edi, [r13 + r14]
mov ecx, 1
sub ecx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, ecx
jge 0x140045c9c
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbx, r13
ja 0x140045ca5
lea rbp, [rsi + rbx*2]
mov rdx, r14
add rdx, rdx
lea rcx, [rsi + r13*2]
mov r9, rdx
mov r8, rbp
call fcn.14022ba40
test edi, edi
js 0x140045ef6
cmp edi, dword [rsi - 0xc]
jg 0x140045ef6
mov dword [rsi - 0x10], edi
movsxd rax, edi
mov word [rsi + rax*2], r15w
lea rbp, [rsi - 0x18]
mov rcx, qword [rbp]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rbp + 0x10], r15d
jl 0x140045cfd
cmp rax, qword [rbp]
jne 0x140045cfd
mov rbx, rbp
lock add dword [rbp + 0x10], 1
jmp 0x140045d3c
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rbp + 8]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x140045d19
call fcn.1400e7510
int3
mov eax, dword [rbp + 8]
mov dword [rbx + 8], eax
mov eax, dword [rbp + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rbp + 0x18]
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.14022ba40
add rbx, 0x18
mov qword [rsp + 0x90], rbx
xor eax, eax
lea rdi, [0x140275388]
mov rsi, rbx
mov ecx, 1
repe cmpsw word [rsi], word [rdi]
je 0x140045d63
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
jne 0x140045d96
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140045eef
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x30]
jmp 0x140045f17
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140045dce
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140045eef
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x30]
jmp 0x140045f17
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140045dea
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x60], rax
mov rdi, qword [rsp + 0x38]
mov rdi, qword [rdi]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], r15d
jl 0x140045e20
cmp rax, qword [rdi - 0x18]
jne 0x140045e20
lea rsi, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x140045e5e
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rsi, rax
test rax, rax
jne 0x140045e3c
call fcn.1400e7510
int3
mov eax, dword [rdi - 0x10]
mov dword [rsi + 8], eax
mov eax, dword [rdi - 0x10]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rsi + 0x18]
call fcn.14022ba40
lea rax, [rsi + 0x18]
mov qword [rsp + 0x48], rax
mov rcx, qword [rbp]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rbp + 0x10], 0
jl 0x140045e8a
cmp rax, qword [rbp]
jne 0x140045e8a
mov rdi, rbp
lock add dword [rbp + 0x10], 1
jmp 0x140045ec9
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rbp + 8]
call qword [rax]
mov rdi, rax
test rax, rax
jne 0x140045ea6
call fcn.1400e7510
int3
mov eax, dword [rbp + 8]
mov dword [rdi + 8], eax
mov eax, dword [rbp + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rbp + 0x18]
add rdx, rdx
lea rcx, [rdi + 0x18]
call fcn.14022ba40
lea rax, [rdi + 0x18]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x58]
call fcn.140040ac0
mov r15d, eax
test eax, eax
jne 0x14004627b
mov rsi, qword [rsp + 0x30]
jmp 0x140045f17
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov ecx, 0x80070057
call fcn.140002bc0
int3
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0xa0]
call fcn.14022ec70
lea rdx, [rsp + 0xa0]
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 0x14004636b
xor eax, eax
mov rcx, r12
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0x9c], 0x5c
jne 0x140045f79
mov word [rsp + rcx*2 + 0x9c], ax
mov rcx, r12
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x140045ff4
lea rdx, [rsi - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x14004607e
cmp dword [rdx + 0x10], eax
jge 0x140045fc5
cmp dword [rsi - 0xc], eax
jge 0x140045fba
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov dword [rsi - 0x10], eax
mov word [rsi], ax
jmp 0x14004607e
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140045fdd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x30], rsi
jmp 0x14004607e
mov ebx, dword [rsi - 0x10]
lea rbp, [rsp + 0xa0]
sub rbp, rsi
sar rbp, 1
mov ecx, 1
sub ecx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, ecx
jge 0x140046027
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbp, rbx
ja 0x140046047
movsxd rax, edi
lea rbx, [rax + rax]
lea r8, [rsi + rbp*2]
mov r9, rbx
mov rdx, rbx
mov rcx, rsi
call fcn.14022c8a0
jmp 0x140046064
movsxd rax, edi
lea rbx, [rax + rax]
mov r9, rbx
lea r8, [rsp + 0xa0]
mov rdx, rbx
mov rcx, rsi
call fcn.14022ba40
test edi, edi
js 0x140046360
cmp edi, dword [rsi - 0xc]
jg 0x140046360
mov dword [rsi - 0x10], edi
mov word [rbx + rsi], 0
xor eax, eax
mov rcx, r12
lea rbp, str.RealtekAudioAP_
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
lea r14, [rcx - 1]
mov rbx, rbp
sub rbx, rsi
sar rbx, 1
mov r13d, dword [rsi - 0x10]
lea edi, [r13 + rcx - 1]
mov edx, 1
sub edx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, edx
jge 0x1400460cb
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbx, r13
ja 0x1400460d4
lea rbp, [rsi + rbx*2]
movsxd rdx, r14d
add rdx, rdx
lea rcx, [rsi + r13*2]
mov r9, rdx
mov r8, rbp
call fcn.14022ba40
test edi, edi
js 0x140046355
cmp edi, dword [rsi - 0xc]
jg 0x140046355
mov dword [rsi - 0x10], edi
movsxd rax, edi
mov word [rsi + rax*2], 0
mov rax, qword [rsp + 0x40]
mov rbp, qword [rax]
movsxd r14, dword [rbp - 0x10]
mov rbx, rbp
sub rbx, rsi
sar rbx, 1
mov r13d, dword [rsi - 0x10]
lea edi, [r13 + r14]
mov ecx, 1
sub ecx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, ecx
jge 0x140046146
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140002be0
mov rsi, qword [rsp + 0x30]
cmp rbx, r13
ja 0x14004614f
lea rbp, [rsi + rbx*2]
mov rdx, r14
add rdx, rdx
lea rcx, [rsi + r13*2]
mov r9, rdx
mov r8, rbp
call fcn.14022ba40
test edi, edi
js 0x14004634a
cmp edi, dword [rsi - 0xc]
jg 0x14004634a
mov dword [rsi - 0x10], edi
movsxd rax, edi
mov word [rsi + rax*2], 0
lea rbp, [rsi - 0x18]
mov rcx, qword [rbp]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rbp + 0x10], 0
jl 0x1400461a8
cmp rax, qword [rbp]
jne 0x1400461a8
mov rbx, rbp
lock add dword [rbp + 0x10], 1
jmp 0x1400461e7
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rbp + 8]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x1400461c4
call fcn.1400e7510
int3
mov eax, dword [rbp + 8]
mov dword [rbx + 8], eax
mov eax, dword [rbp + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rbp + 0x18]
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.14022ba40
add rbx, 0x18
mov qword [rsp + 0x88], rbx
xor eax, eax
lea rdi, [0x140275388]
mov rsi, rbx
mov ecx, 1
repe cmpsw word [rsi], word [rdi]
je 0x14004620e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
jne 0x140046242
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14004627b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
jmp 0x140046370
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14004628a
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14004627b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
jmp 0x140046370
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
jmp 0x140046370
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400462a6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
mov rbx, qword [rsp + 0x38]
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.140002d40
mov rsi, rax
mov rcx, qword [rbp]
mov rdx, qword [rcx]
call qword [rdx + 0x20]
mov rcx, rax
cmp dword [rbp + 0x10], 0
jl 0x1400462e8
cmp rax, qword [rbp]
jne 0x1400462e8
mov rdi, rbp
lock add dword [rbp + 0x10], 1
jmp 0x140046327
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rbp + 8]
call qword [rax]
mov rdi, rax
test rax, rax
jne 0x140046304
call fcn.1400e7510
int3
mov eax, dword [rbp + 8]
mov dword [rdi + 8], eax
mov eax, dword [rbp + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rbp + 0x18]
add rdx, rdx
lea rcx, [rdi + 0x18]
call fcn.14022ba40
lea rax, [rdi + 0x18]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.140040ac0
mov r15d, eax
mov rsi, qword [rsp + 0x30]
jmp 0x140046370
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov ecx, 0x80070057
call fcn.140002bc0
int3
mov rbx, qword [rsp + 0x38]
lea rdx, [rsi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14004638d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax]
sub rdx, 0x18
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400463b2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbx]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r12d
add r12d, 0xffffffff
test r12d, r12d
jg 0x1400463d1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r15d
mov rcx, qword [rsp + 0x100a0]
xor rcx, rsp
call fcn.14022b9b0
mov rbx, qword [rsp + 0x10100]
add rsp, 0x100b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret