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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x140
mov rax, qword [0x140099938]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rbx, r8
mov rdi, rdx
mov rbp, rcx
lea r15, str.CDeviceInf::Init
mov esi, 5
lea r8, [0x14007f570]
mov rdx, r15
mov ecx, esi
mov r13d, r9d
call fcn.140009480
cmp dword [rbp + 0xc], 0
jne 0x140041236
cmp dword [rbp + 8], 0
jne 0x140041236
test rdi, rdi
jne 0x140041040
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140041256
mov rdx, rbx
mov rcx, rdi
call fcn.14005ca00
test rax, rax
je 0x14004102e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140041068
mov ecx, 2
jmp 0x14004123b
mov rcx, rdi
call fcn.14005b1c0
lea rcx, [rbp + 0x18]
mov rdx, rdi
mov r8, rax
call fcn.140002280
cmp qword [rbp + 0x38], 8
jb 0x14004108c
mov rdx, qword [rbp + 0x20]
jmp 0x140041090
lea rdx, [rbp + 0x20]
lea rcx, [rbp + 0x50]
call fcn.140053384
xor edx, edx
lea rcx, [rsp + 0x70]
lea r8d, [rdx + 0x40]
call fcn.14005bb90
xor edx, edx
lea rcx, [rbp + 0x380]
lea r8d, [rdx + 0x10]
call fcn.14005bb90
xor edx, edx
lea rcx, [rbp + 0x388]
lea r8d, [rdx + 8]
call fcn.14005bb90
cmp qword [rbp + 0x38], 8
jb 0x1400410da
mov rcx, qword [rbp + 0x20]
jmp 0x1400410de
lea rcx, [rbp + 0x20]
and qword [rsp + 0x20], 0
lea r8, [rsp + 0x70]
lea rdx, [rbp + 0x380]
mov r9d, 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiGetINFClassW]
test eax, eax
jne 0x140041122
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetupDiGetINFClass_failed.__0x_1_lX___n
mov rdx, r15
mov r9d, eax
mov ecx, 2
call fcn.140009480
jmp 0x140041039
lea r9, [rsp + 0x70]
lea r8, str.ClassName____1_s___n
mov rdx, r15
mov ecx, esi
call fcn.140009480
lea rcx, [rsp + 0x70]
call fcn.14005b1c0
lea rcx, [rbp + 0x390]
lea rdx, [rsp + 0x70]
mov r8, rax
call fcn.140002280
movzx ecx, byte [rbp + 0x38d]
movzx edx, byte [rbp + 0x38c]
movzx r8d, byte [rbp + 0x38a]
movzx r11d, byte [rbp + 0x38f]
movzx eax, byte [rbp + 0x38e]
movzx r10d, byte [rbp + 0x38b]
movzx ebx, byte [rbp + 0x389]
movzx edi, byte [rbp + 0x388]
movzx esi, word [rbp + 0x386]
movzx r9d, word [rbp + 0x384]
mov dword [rsp + 0x60], r11d
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], r8d
mov r8d, dword [rbp + 0x380]
mov dword [rsp + 0x30], ebx
lea rdx, str.GUID___08lX__04lX__04lx__02X_02X__02X_02X_02X_02X_02X_02X_n
lea rcx, [rsp + 0xb0]
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], esi
call fcn.14003a3f0
mov esi, 5
lea r9, [rsp + 0xb0]
lea r8, str.GUID___1_s__n
mov ecx, esi
mov rdx, r15
call fcn.140009480
cmp dword [rsp + 0x1a0], 0
lea ebx, [rsi - 4]
mov dword [rbp + 8], ebx
mov dword [rbp + 0x10], r13d
je 0x140041243
mov edx, ebx
mov rcx, rbp
call sym.DELDRV64.exe_public:_int___cdecl_CDeviceInf::GetFullInfo_int____ptr64
test eax, eax
jne 0x140041243
lea r8, str.CManufacturers_object_creation_failed._n
lea ecx, [rsi - 3]
mov rdx, r15
call fcn.140009480
jmp 0x140041241
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
lea r8, [0x14007f590]
mov rdx, r15
mov ecx, esi
call fcn.140009480
mov eax, ebx
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.14005bad0
add rsp, 0x140
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret