Function at 0x140004520
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x290
mov rax, qword [0x140726340]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor edi, edi
mov qword [rsp + 0x48], rdi
mov rbp, rdi
mov rbx, rdi
test ecx, ecx
jne 0x14000462f
mov ecx, 0x42ea
call fcn.140003000
test eax, eax
je 0x1400045f2
lea rcx, [rsp + 0x72]
xor edx, edx
mov r8d, 0x208
mov word [rsp + 0x70], di
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x70]
call fcn.140003fc0
cmp di, word [rsp + 0x70]
je 0x1400045f2
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400045f2
test al, 0x10
je 0x1400045f2
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
not rcx
lea rdi, [rcx - 1]
lea rdx, [rcx + rcx]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x14000462f
lea r8, [rsp + 0x70]
lea rdx, [rdi + 1]
mov rcx, rax
call fcn.1400022b0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
jmp 0x14000486a
xor eax, eax
xor ecx, ecx
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x50], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, 0x1770
call fcn.140003000
test eax, eax
jne 0x140004636
lea ecx, [rax + 0x78]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000486a
mov rax, qword [0x14077b1e0]
test rax, rax
jne 0x14000465c
lea rcx, str.Setupapi.dll
xor edx, edx
call fcn.140002970
mov qword [0x14077b1e0], rax
test rax, rax
je 0x14000462f
cmp qword [0x14077b208], rbx
jne 0x140004688
lea rdx, str.SetupDiGetDevicePropertyW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14077b208], rax
test rax, rax
je 0x14000462f
mov rax, qword [0x14077b1e0]
cmp qword [0x14077b218], rbx
jne 0x1400046b4
lea rdx, str.SetupGetInfDriverStoreLocationW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14077b218], rax
test rax, rax
je 0x14000462f
mov rax, qword [0x14077b1e0]
cmp qword [0x14077b210], rbx
jne 0x1400046dd
lea rdx, [0x1402fa170]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14077b210], rax
test rax, rax
je 0x14000462f
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x48]
xor ecx, ecx
call fcn.140003230
test eax, eax
je 0x14000462f
mov dword [rsp + 0x38], edi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x2a8], rsi
mov rsi, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x44]
lea r8, [0x1402f9f48]
lea rdx, [rsp + 0x50]
mov rcx, rsi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x40], edi
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x20], rdi
call qword [0x14077b208]
mov r11d, dword [rsp + 0x40]
test r11d, r11d
je 0x140004832
mov rdx, r11
mov ecx, 0x40
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbp, rax
test rax, rax
je 0x140004832
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], ecx
lea r9, [rsp + 0x44]
lea r8, [0x1402f9f48]
lea rdx, [rsp + 0x50]
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [0x14077b208]
test eax, eax
je 0x140004832
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
xor edx, edx
mov rcx, rbp
mov dword [rsp + 0x20], edi
call qword [0x14077b218]
mov r11d, dword [rsp + 0x40]
test r11d, r11d
je 0x140004832
mov rdx, r11
mov ecx, 0x40
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140004832
mov ecx, dword [rsp + 0x40]
mov qword [rsp + 0x28], rdi
mov r9, rax
mov dword [rsp + 0x20], ecx
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [0x14077b218]
test eax, eax
je 0x140004832
mov edx, 0x5c
mov rcx, rbx
call sub.VCRUNTIME140.dll_wcsrchr
test rax, rax
je 0x14000481b
lea rdx, [rax + 2]
jmp 0x14000481e
mov rdx, rbx
sub rdx, rbx
mov rcx, rbx
sar rdx, 1
dec rdx
call fcn.140002e20
mov rdi, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x140004852
mov rcx, rsi
call qword [0x14077b210]
mov rsi, qword [rsp + 0x2a8]
test rdi, rdi
je 0x140004867
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rdi
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.1402cbf10
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret