Function at 0x140003f50
Capabilities:
Check os version

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x128
mov rax, qword [0x140018008]
xor rax, rsp
mov qword [rsp + 0x110], rax
movzx r12d, dl
mov r13, rcx
xor r15d, r15d
lea r9d, [r15 + 0xc]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp rax, 0xffffffffffffffff
mov rbp, rax
jne 0x140003f9d
lea eax, [rbp + 7]
jmp 0x1400042e5
mov qword [rsp + 0x158], rbx
mov qword [rsp + 0x160], rsi
mov qword [rsp + 0x168], rdi
lea r8, [rsp + 0x50]
xor edi, edi
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x120], r14
mov dword [rsp + 0x50], 0x20
mov dword [rsp + 0x4c], edi
xor r14d, r14d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140004284
nop
nop
nop
xor ecx, ecx
lea rax, [rsp + 0x40]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
lea r8d, [rcx + 1]
mov qword [rsp + 0x20], rcx
mov rsi, rcx
mov dword [rsp + 0x40], ecx
mov dword [rsp + 0x44], ecx
mov rbx, rcx
lea rdx, [rsp + 0x50]
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x140004097
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x140004097
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140004304
test rsi, rsi
je 0x140004057
mov rcx, rsi
call fcn.140005400
mov ecx, dword [rsp + 0x40]
call fcn.140005330
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rsi, rax
lea rax, [rsp + 0x40]
mov r8d, 1
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov rcx, rbp
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x140004030
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x140004260
test rsi, rsi
jne 0x1400040e7
mov ecx, dword [rsp + 0x40]
call fcn.140005330
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rsi, rax
lea rax, [rsp + 0x40]
mov r8d, 1
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov rcx, rbp
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
cmp byte [rsi], bl
mov rdi, rsi
je 0x14000424f
nop
nop
nop
nop
mov eax, dword [rsp + 0x40]
add rax, rsi
cmp rdi, rax
jae 0x14000424f
mov rdx, r13
mov rcx, rdi
call fcn.140005010
test rax, rax
je 0x140004235
cmp r12b, 2
mov r14d, 1
jne 0x140004215
lea rax, [rsp + 0x44]
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x44]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x1400041c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400041c1
test rbx, rbx
je 0x14000417e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [rsp + 0x44]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rbx, rax
lea rax, [rsp + 0x44]
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x44]
mov rcx, rbp
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x140004165
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x70], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x1400041fa
cmp dword [rsp + 0x74], 6
jne 0x1400041fa
cmp dword [rsp + 0x78], r14d
jb 0x1400041fa
mov eax, dword [0x140019a88]
test eax, eax
je 0x1400041fa
cmp eax, 3
je 0x1400041fa
cmp eax, 7
jne 0x140004208
lea rdx, [rsp + 0x50]
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiRemoveDevice]
mov rdx, rbx
mov rcx, r13
call fcn.140003be0
jmp 0x140004235
cmp r12b, r14b
jne 0x14000422f
lea r8, [rsp + 0x50]
mov rdx, rbp
mov ecx, 2
call qword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
jmp 0x140004235
cmp r12b, 3
je 0x14000424f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
cdqe
add rdi, rax
cmp byte [rdi], r15b
jne 0x140004100
mov rcx, rsi
call fcn.140005400
test r14d, r14d
jne 0x140004295
mov edi, dword [rsp + 0x4c]
add edi, 1
lea r8, [rsp + 0x50]
mov rcx, rbp
mov edx, edi
mov dword [rsp + 0x4c], edi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140003ff0
test r14d, r14d
jne 0x140004295
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 7
test eax, eax
cmovne r15d, ecx
cmp r12b, 3
jne 0x1400042a9
xor r15d, r15d
test r14d, r14d
setne r15b
add r15d, 9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r15d
mov rdi, qword [rsp + 0x168]
mov rsi, qword [rsp + 0x160]
mov rbx, qword [rsp + 0x158]
mov r14, qword [rsp + 0x120]
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.140005210
add rsp, 0x128
pop r15
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0x63
jmp 0x1400042c5