Function at 0x140013740
Capabilities:
Reference wmi statements

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0x4f]
sub rsp, 0x88
mov rax, qword [0x140027040]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor edi, edi
lea r8, [0x14001e8b0]
lea rdx, [rbp + 0xf]
mov qword [rbp - 1], rdi
lea rcx, [rbp - 1]
mov qword [rbp + 0xf], rdi
mov qword [rbp - 9], rdi
call fcn.140016e60
test eax, eax
je 0x1400139a0
mov qword [rsp + 0xa0], rbx
lea rcx, [0x1400224d8]
mov qword [rsp + 0xa8], rsi
mov qword [rsp + 0xb0], r14
mov qword [rsp + 0x80], r15
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea rcx, str.SELECT__FROM_Win32_Bus
mov rsi, rax
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov r15d, 1
mov rbx, rax
mov r14d, r15d
test rsi, rsi
je 0x14001383b
test rax, rax
je 0x140013832
mov rcx, qword [rbp - 1]
lea rax, [rbp - 9]
mov qword [rsp + 0x28], rax
mov r9d, 0x30
mov r8, rbx
mov qword [rsp + 0x20], rdi
mov rdx, qword [rcx]
mov r10, qword [rdx + 0xa0]
mov rdx, rsi
call r10
test eax, eax
jns 0x140013832
lea rcx, str.ExecQuery
mov r14d, edi
call fcn.140014740
mov rcx, qword [rbp - 1]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0xf]
mov rax, qword [rcx]
call qword [rax + 0x10]
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
test rbx, rbx
je 0x140013849
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
test r14d, r14d
mov r14, qword [rsp + 0xb0]
je 0x140013970
mov rcx, qword [rbp - 9]
mov esi, edi
mov qword [rbp + 7], rdi
mov ebx, edi
mov dword [rbp + 0x2f], edi
test rcx, rcx
je 0x140013950
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rcx]
lea rdx, [rbp + 0x2f]
mov qword [rsp + 0x20], rdx
lea r9, [rbp + 7]
mov edx, 0xffffffff
mov r8d, r15d
call qword [rax + 0x20]
cmp dword [rbp + 0x2f], edi
je 0x140013941
mov rcx, qword [rbp + 7]
lea r9, [rbp + 0x17]
mov qword [rsp + 0x28], rdi
lea rdx, str.Name
xor r8d, r8d
mov qword [rsp + 0x20], rdi
inc esi
mov rax, qword [rcx]
call qword [rax + 0x20]
test eax, eax
js 0x140013928
movzx eax, word [rbp + 0x17]
cmp ax, r15w
je 0x140013928
test al, 8
je 0x14001391e
mov rcx, qword [rbp + 0x1f]
lea rdx, str.ACPIBus_BUS_0
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
jne 0x14001391c
mov rcx, qword [rbp + 0x1f]
lea rdx, str.PCI_BUS_0
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
jne 0x14001391c
mov rcx, qword [rbp + 0x1f]
lea rdx, str.PNP_BUS_0
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x14001391e
inc ebx
lea rcx, [rbp + 0x17]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov rcx, qword [rbp + 7]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp - 9]
test rcx, rcx
jne 0x140013880
jmp 0x140013945
mov rcx, qword [rbp - 9]
cmp esi, 3
jne 0x140013950
cmp ebx, esi
cmove edi, r15d
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov rcx, qword [rbp - 1]
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov rcx, qword [rbp + 0xf]
mov rdx, qword [rcx]
call qword [rdx + 0x10]
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rsi, qword [rsp + 0xa8]
mov eax, edi
mov rbx, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x80]
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400177b0
add rsp, 0x88
pop rdi
pop rbp
ret
mov eax, edi
jmp 0x14001398a