Function at 0x140045860
Capabilities:
Connect to wmi namespace via wbemlocator
Reference sql statements
Reference wmi statements

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xd0
mov rax, qword [0x140071040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
xor r12d, r12d
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], r12
lea edx, [r12 + 2]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x140045a3e
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea edx, [r12 - 1]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
nop
test eax, eax
js 0x140045a38
lea rax, [rbp - 0x41]
mov qword [rsp + 0x20], rax
lea r9, [0x14004f480]
xor edx, edx
lea r8d, [r12 + 1]
lea rcx, [0x14004f490]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x140045a38
mov rax, qword [rbp - 0x41]
mov rcx, qword [rax]
mov rdi, qword [rcx + 0x18]
lea ecx, [r12 + 0x18]
call fcn.140048308
mov rbx, rax
mov qword [rbp - 0x21], rax
test rax, rax
je 0x14004595b
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, str.ROOTCIMV2
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rbx], rax
test rax, rax
je 0x140045d46
jmp 0x14004595e
mov rbx, r12
mov qword [rbp - 0x21], rbx
test rbx, rbx
je 0x140045d51
lea rax, [rbp - 0x39]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rbx]
mov rcx, qword [rbp - 0x41]
mov rax, rdi
call qword [0x14004ed88]
mov edi, eax
mov ecx, 0xffffffff
lock xadd dword [rbx + 0x10], ecx
cmp ecx, 1
jne 0x1400459df
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400459c0
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], r12
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400459d2
call fcn.140048300
mov qword [rbx + 8], r12
mov edx, 0x18
mov rcx, rbx
call fcn.140048300
nop
test edi, edi
js 0x140045a27
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xa]
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x140045a68
mov rcx, qword [rbp - 0x39]
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14004ed88]
mov rcx, qword [rbp - 0x41]
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14004ed88]
call qword [sym.imp.ole32.dll_CoUninitialize]
xor al, al
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400482e0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov qword ds:[rbp - 0x29], r12
mov rax, qword [rbp - 0x39]
mov rcx, qword [rax]
mov r14, qword [rcx + 0xa0]
mov ecx, 0x18
call fcn.140048308
mov rbx, rax
mov qword [rbp - 0x31], rax
test rax, rax
je 0x140045aad
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, str.SELECT__FROM_Win32_LogonSession_WHERE_LogonType__2
call fcn.1400480a0
mov qword [rbx], rax
jmp 0x140045ab0
mov rbx, r12
mov qword [rbp + 0xf], rbx
test rbx, rbx
je 0x140045d51
mov rsi, qword [rbx]
mov ecx, 0x18
call fcn.140048308
mov rdi, rax
mov qword [rbp - 0x31], rax
test rax, rax
je 0x140045af2
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, [0x14004f9a8]
call fcn.1400480a0
mov qword [rdi], rax
jmp 0x140045af5
mov rdi, r12
mov qword ds:[rbp + 0x17], rdi
test rdi, rdi
je 0x140045d3b
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
mov r9d, 0x30
mov r8, rsi
mov rdx, qword [rdi]
mov rcx, qword [rbp - 0x39]
mov rax, r14
call qword [0x14004ed88]
mov esi, eax
mov ecx, 0xffffffff
lock xadd dword [rdi + 0x10], ecx
cmp ecx, 1
jne 0x140045b77
mov rcx, qword [rdi]
test rcx, rcx
je 0x140045b56
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140045b69
nop
call fcn.140048300
mov qword [rdi + 8], r12
mov edx, 0x18
mov rcx, rdi
call fcn.140048300
nop
mov eax, 0xffffffff
lock xadd dword [rbx + 0x10], eax
cmp eax, 1
jne 0x140045bbb
mov rcx, qword [rbx]
test rcx, rcx
je 0x140045b97
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], r12
mov rcx, qword ds:[rbx + 8]
test rcx, rcx
je 0x140045bae
call fcn.140048300
mov qword [rbx + 8], r12
mov edx, 0x18
mov rcx, rbx
call fcn.140048300
nop dword [rax + rax]
test esi, esi
js 0x140045a3e
mov qword [rbp - 0x11], r12
mov bl, 1
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x140045a3e
nop dword [rax + rax]
mov qword [rbp - 0x19], r12
mov dword [rbp - 0x49], r12d
mov rax, qword [rcx]
lea rdx, [rbp - 0x49]
mov qword [rsp + 0x20], rdx
lea r9, [rbp - 0x19]
mov edx, 0xffffffff
lea r8d, [rdx + 2]
mov rax, qword [rax + 0x20]
call qword [0x14004ed88]
mov edi, eax
cmp dword [rbp - 0x49], 0
je 0x140045d0d
lea rcx, ds:[rbp - 9]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
test edi, edi
js 0x140045ce3
mov rcx, qword [rbp - 0x19]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
lea r9, [rbp - 9]
xor r8d, r8d
lea rdx, str.StartTime
mov rax, qword [rax + 0x20]
call qword [0x14004ed88]
test eax, eax
js 0x140045ce3
cmp word [rbp - 9], 8
jne 0x140045ce3
xorps xmm0, xmm0
movups xmmword [rbp + 0x1f], xmm0
lea rax, [rbp + 0x2b]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x29]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x27]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x25]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x21]
lea r8, [rbp + 0x1f]
lea rdx, str._4hd_2hd_2hd_2hd_2hd_2hd
mov rcx, qword [rbp - 1]
call fcn.140006b30
lea rdx, [rbp - 0x21]
lea rcx, [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test bl, bl
jne 0x140045cd1
lea rdx, [rbp - 0x11]
lea rcx, [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x140045ce3
mov rax, qword [rbp - 0x21]
mov qword [rbp - 0x11], rax
movups xmm0, xmmword [rbp + 0x1f]
movups xmmword [r15], xmm0
xor bl, bl
lea rcx, [rbp - 9]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov rcx, qword [rbp - 0x19]
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14004ed88]
mov rcx, qword [rbp - 0x29]
test rcx, rcx
jne 0x140045be0
jmp 0x140045d26
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x140045d26
mov rax, qword ds:[rcx]
mov rax, qword [rax + 0x10]
call qword [0x14004ed88]
test bl, bl
jne 0x140045a3e
call qword [sym.imp.ole32.dll_CoUninitialize]
mov al, 1
jmp 0x140045a40
mov ecx, 0x8007000e
call fcn.140048090
nop
mov ecx, 0x8007000e
call fcn.140048090
nop
mov ecx, 0x8007000e
call fcn.140048090
int3