Function at 0x140003aa0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x9f0]
sub rsp, 0xaf0
mov rax, qword [0x1400375a0]
xor rax, rsp
mov qword [rbp + 0x9e0], rax
mov rsi, rdx
mov rdi, rcx
xor edx, edx
xor ecx, ecx
mov r13, r8
xor ebx, ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInfoList]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x140003af5
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140003c84
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
mov dword [rsp + 0x38], 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInfoW]
test eax, eax
jne 0x140003b2a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140003c79
lea rdx, [rsp + 0x38]
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiSetSelectedDevice]
test eax, eax
je 0x140003b1d
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x38]
mov rcx, r12
mov dword [rsp + 0x60], 0x248
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsW]
test eax, eax
je 0x140003b1d
or dword [rsp + 0x64], 0x10000
lea rax, [rbp - 0x64]
mov edi, 0x104
mov edx, edi
lea rcx, [rbp - 0x64]
mov r8d, ebx
sub rsi, rax
nop dword [rax + rax]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140003ba3
movzx eax, word [rsi + rcx]
test ax, ax
je 0x140003ba3
mov word [rcx], ax
add rcx, 2
dec rdx
jne 0x140003b80
jmp 0x140003ba8
test rdx, rdx
jne 0x140003bb2
sub rcx, 2
mov r8d, 0x8007007a
mov word [rcx], bx
test r8d, r8d
jns 0x140003bc4
mov ebx, 0x57
jmp 0x140003c79
or dword [rsp + 0x68], 0x800
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x38]
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsW]
test eax, eax
je 0x140003b1d
lea rdx, [rsp + 0x38]
mov r8d, 2
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiBuildDriverInfoList]
test eax, eax
je 0x140003b1d
lea r8, [rsp + 0x38]
mov rdx, r12
mov ecx, 0x17
call qword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
je 0x140003b1d
lea r8, [rbp + 0x1b0]
lea rdx, [rsp + 0x38]
mov rcx, r12
mov dword [rbp + 0x1b0], 0x620
call qword [sym.imp.SETUPAPI.dll_SetupDiGetSelectedDriverW]
test eax, eax
je 0x140003b1d
lea rcx, [rbp + 0x7d0]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140003b1d
mov rcx, rdi
lea rax, [rbp + 0x7d0]
cmp word [rax], bx
je 0x140003caa
add rax, 2
dec rcx
jne 0x140003c66
mov ebx, 0x7a
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, ebx
mov rcx, qword [rbp + 0x9e0]
xor rcx, rsp
call fcn.140015f90
mov rbx, qword [rsp + 0xb28]
add rsp, 0xaf0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test rcx, rcx
je 0x140003c74
mov rdx, rdi
mov r9d, ebx
sub rdx, rcx
sub rdi, rdx
lea rax, [rbp + rdx*2 + 0x7d0]
je 0x140003cfc
lea r8, str.NEWDEV.DLL
lea rdx, [rdi + rdx + 0x7ffffefb]
sub r8, rax
test rdx, rdx
je 0x140003cf7
movzx ecx, word [r8 + rax]
test cx, cx
je 0x140003cf7
mov word [rax], cx
add rax, 2
dec rdx
dec rdi
jne 0x140003cd7
jmp 0x140003cfc
test rdi, rdi
jne 0x140003d06
sub rax, 2
mov r9d, 0x8007007a
mov word [rax], bx
test r9d, r9d
js 0x140003c74
lea rcx, [rbp + 0x7d0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x140003b1d
lea rdx, str.InstallSelectedDriver
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140003d5e
lea rcx, [rsp + 0x30]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rcx
xor ecx, ecx
mov rdx, r12
call rax
test eax, eax
jne 0x140003d74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140003c79
test dword [rsp + 0x30], 0x180
je 0x140003d86
mov dword [r13], 1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140003c79