Function at 0x140001dd0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x270
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x2c0], rbx
mov rax, qword [0x140012070]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rdi, rdx
mov r15, rcx
mov edx, 0x104
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, [0x14000f228]
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rdx, [r15 + 8]
mov r8d, 0x104
lea rcx, [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
mov rdx, rdi
lea rcx, [rsp + 0x150]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x20], rsi
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
xor eax, eax
or rbp, 0xffffffffffffffff
mov rcx, rbp
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
xor r13d, r13d
lea r14d, [rax + 1]
test ecx, ecx
jne 0x140001f1f
lea rdx, [rsi - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140001fa1
cmp dword [rdx + 0x10], eax
jge 0x140001eed
cmp dword [rsi - 0xc], eax
jge 0x140001ee2
mov ecx, 0x80070057
call fcn.140001490
int3
mov dword [rsi - 0x10], r13d
mov byte [rsi], al
jmp 0x140001fa1
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140001f03
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
mov rbx, qword [rsp + 0x28]
jmp 0x140001fa1
mov r12d, dword [rsi - 0x10]
lea r13, [rsp + 0x40]
sub r13, rsi
mov ecx, r14d
sub ecx, dword [rsi - 8]
mov eax, dword [rsi - 0xc]
sub eax, edi
or eax, ecx
jge 0x140001f50
mov edx, edi
lea rcx, [rsp + 0x20]
call fcn.140003a10
mov rbx, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x20]
cmp r13, r12
ja 0x140001f6e
movsxd r12, edi
lea r8, [r13 + rsi]
movsxd rdx, dword [rsi - 0xc]
mov r9, r12
mov rcx, rsi
call fcn.1400048e8
jmp 0x140001f85
movsxd r12, edi
movsxd rdx, dword [rsi - 0xc]
mov r9, r12
lea r8, [rsp + 0x40]
mov rcx, rsi
call fcn.14000465c
test edi, edi
js 0x140002112
cmp edi, dword [rsi - 0xc]
jg 0x140002112
mov dword [rsi - 0x10], edi
mov byte [r12 + rsi], 0
xor r13d, r13d
xor eax, eax
mov rcx, rbp
lea rdi, [rsp + 0x150]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140002017
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140002090
cmp dword [rdx + 0x10], eax
jge 0x140001fed
cmp dword [rbx - 0xc], eax
jge 0x140001fe2
mov ecx, 0x80070057
call fcn.140001490
int3
mov dword [rbx - 0x10], r13d
mov byte [rbx], al
jmp 0x140002090
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140002003
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
jmp 0x140002090
mov esi, dword [rbx - 0x10]
lea r12, [rsp + 0x150]
sub r12, rbx
mov ecx, r14d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140002045
mov edx, edi
lea rcx, [rsp + 0x28]
call fcn.140003a10
mov rbx, qword [rsp + 0x28]
cmp r12, rsi
ja 0x140002062
movsxd rsi, edi
lea r8, [rbx + r12]
movsxd rdx, dword [rbx - 0xc]
mov r9, rsi
mov rcx, rbx
call fcn.1400048e8
jmp 0x14000207c
movsxd rsi, edi
movsxd rdx, dword [rbx - 0xc]
mov r9, rsi
lea r8, [rsp + 0x150]
mov rcx, rbx
call fcn.14000465c
test edi, edi
js 0x140002107
cmp edi, dword [rbx - 0xc]
jg 0x140002107
mov dword [rbx - 0x10], edi
mov byte [rsi + rbx], 0
lea rdx, [rsp + 0x20]
mov rcx, r15
call fcn.140002920
mov dword [rsp + 0x30], r13d
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1400020c8
lea r8, [rsp + 0x30]
mov rdx, qword [r15]
lea rcx, [rsp + 0x40]
call qword [sym.imp.SETUPAPI.dll_SetupOpenAppendInfFileA]
test eax, eax
jne 0x1400020cb
mov r14d, r13d
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400020e5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
dec ebp
test ebp, ebp
jg 0x140002102
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, r14d
jmp 0x14000211d
mov ecx, 0x80070057
call fcn.140001490
int3
mov ecx, 0x80070057
call fcn.140001490
nop
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400042d0
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret