Function at 0x1800efd80
Capabilities:
Check os version
Connect to wmi namespace via wbemlocator
Reference wmi statements

Disassembly:
push rbp
push rdi
push r12
lea rbp, [rsp - 0x130]
sub rsp, 0x230
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rbp + 0x110], rax
xor r12d, r12d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x58], r12
mov edi, r12d
mov qword [rsp + 0x78], r12
call qword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x1800efdca
xor eax, eax
jmp 0x1800effcf
mov qword [rsp + 0x250], rbx
xor r9d, r9d
mov qword [rsp + 0x40], r12
xor r8d, r8d
mov qword [rsp + 0x258], rsi
xor ecx, ecx
mov qword [rsp + 0x260], r13
mov r13d, 3
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x228], r14
mov r14d, 0xffffffff
mov qword [rsp + 0x30], r12
mov edx, r14d
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x220], r15
mov dword [rsp + 0x20], 6
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
js 0x1800eff7f
lea rax, [rsp + 0x78]
xor edx, edx
lea r9, [0x180142b28]
mov qword [rsp + 0x20], rax
lea r8d, [r13 - 2]
lea rcx, [0x180142bf8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x1800eff7f
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x10], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rbp - 0xc], 6
lea ecx, [r13 + 0x15]
jae 0x1800efebe
call fcn.1800f3074
mov rbx, rax
test rax, rax
je 0x1800efeb1
mov qword [rax], r12
lea rcx, [0x180164650]
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rbx], rax
test rax, rax
je 0x1800f03ff
jmp 0x1800efeb4
mov rbx, r12
test rbx, rbx
jne 0x1800eff01
jmp 0x1800f03ff
call fcn.1800f3074
mov rbx, rax
test rax, rax
je 0x1800efef5
mov qword [rax], r12
lea rcx, str.._rootCIMV2TerminalServices
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rbx], rax
test rax, rax
je 0x1800f03ff
jmp 0x1800efef8
mov rbx, r12
test rbx, rbx
je 0x1800f03ff
mov rcx, qword [rsp + 0x78]
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x40], rdx
xor r9d, r9d
mov rdx, qword [rbx]
xor r8d, r8d
mov qword [rsp + 0x38], r12
mov rax, qword [rcx]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], r12
call qword [rax + 0x18]
test eax, eax
jns 0x1800effea
test rbx, rbx
je 0x1800eff7f
lock xadd dword [rbx + 0x10], r14d
cmp r14d, 1
jne 0x1800eff7f
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800eff60
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], r12
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800eff72
call sym.SafeBase64.dll_SafeBase_free
mov qword [rbx + 8], r12
mov edx, 0x18
mov rcx, rbx
call fcn.18001cc90
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1800eff8f
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1800eff9f
mov rdx, qword [rcx]
call qword [rdx + 0x10]
call qword [sym.imp.ole32.dll_CoUninitialize]
mov r14, qword [rsp + 0x228]
mov eax, edi
mov r13, qword [rsp + 0x260]
mov rsi, qword [rsp + 0x258]
mov rbx, qword [rsp + 0x250]
mov r15, qword [rsp + 0x220]
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x230
pop r12
pop rdi
pop rbp
ret
mov rcx, qword [rsp + 0x58]
xor r9d, r9d
mov dword [rsp + 0x38], r12d
xor r8d, r8d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r13d
lea edx, [r9 + 0xa]
mov dword [rsp + 0x20], 6
call qword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
js 0x1800eff3e
mov ecx, 0x18
mov qword [rsp + 0x70], r12
call fcn.1800f3074
mov rdi, rax
test rax, rax
je 0x1800f03ff
mov qword [rax], r12
lea rcx, str.SELECT__FROM_Win32_TerminalServiceSetting
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call fcn.180111960
mov ecx, 0x18
mov qword [rdi], rax
mov r15, rax
call fcn.1800f3074
mov rsi, rax
test rax, rax
je 0x1800f03ff
mov qword [rax], r12
lea rcx, [0x1801646dc]
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call fcn.180111960
mov qword [rsi], rax
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov r9d, 0x30
mov qword [rsp + 0x28], rdx
mov r8, r15
mov rdx, rax
mov qword [rsp + 0x20], r12
mov r10, qword [rcx]
call qword [r10 + 0xa0]
mov eax, r14d
lock xadd dword [rsi + 0x10], eax
cmp eax, 1
jne 0x1800f00f5
mov rcx, qword [rsi]
test rcx, rcx
je 0x1800f00d6
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsi], r12
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1800f00e8
call sym.SafeBase64.dll_SafeBase_free
mov qword [rsi + 8], r12
mov edx, 0x18
mov rcx, rsi
call fcn.18001cc90
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
cmp eax, 1
jne 0x1800f0132
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800f0113
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1800f0125
call sym.SafeBase64.dll_SafeBase_free
mov qword [rdi + 8], r12
mov edx, 0x18
mov rcx, rdi
call fcn.18001cc90
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x60], r12
mov dword [rbp - 0x50], r12d
test rcx, rcx
je 0x1800f03cc
nop dword [rax]
mov rax, qword [rcx]
lea rdx, [rbp - 0x50]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x60]
mov edx, r14d
mov r8d, 1
call qword [rax + 0x20]
mov edi, eax
cmp dword [rbp - 0x50], r12d
je 0x1800f03cc
test eax, eax
js 0x1800f01c1
mov rcx, qword [rsp + 0x60]
lea r9, [rbp - 0x40]
mov qword [rsp + 0x28], r12
lea rdx, [0x1801646e0]
xor r8d, r8d
mov qword [rsp + 0x20], r12
mov rax, qword [rcx]
call qword [rax + 0x20]
mov edi, eax
test eax, eax
js 0x1800f01b7
cmp word [rbp - 0x40], r13w
jne 0x1800f01b7
cmp dword [rbp - 0x38], r12d
jg 0x1800f03e8
lea rcx, [rbp - 0x40]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test edi, edi
js 0x1800f03be
mov ecx, 0x18
call fcn.1800f3074
mov rdi, rax
test rax, rax
je 0x1800f03f4
mov qword [rax], r12
lea rcx, str.SetAllowTSConnections
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rdi], rax
test rax, rax
je 0x1800f03f4
mov ecx, 0x18
call fcn.1800f3074
mov rsi, rax
test rax, rax
je 0x1800f03f4
mov qword [rax], r12
lea rcx, str.Win32_TerminalServiceSetting
mov qword [rax + 0x10], 1
mov qword [rax + 8], r12
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsi], rax
test rax, rax
je 0x1800f03f4
mov rcx, qword [rsp + 0x58]
lea rdx, [rbp - 0x80]
mov qword [rbp - 0x80], r12
xor r9d, r9d
mov qword [rsp + 0x28], r12
xor r8d, r8d
mov qword [rsp + 0x20], rdx
mov rax, qword [rcx]
mov rdx, qword [rsi]
call qword [rax + 0x30]
mov rcx, qword [rbp - 0x80]
lea r9, [rbp - 0x78]
mov qword [rbp - 0x78], r12
xor r8d, r8d
mov rdx, qword [rdi]
mov qword [rsp + 0x20], r12
mov rax, qword [rcx]
call qword [rax + 0x98]
mov rcx, qword [rbp - 0x78]
lea r8, [rsp + 0x68]
mov qword [rsp + 0x68], r12
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x78]
mov rcx, qword [rsp + 0x68]
lea r9, [rbp - 0x28]
mov word [rbp - 0x28], r13w
lea rdx, [0x1801646e0]
mov dword [rbp - 0x20], 1
xor r8d, r8d
mov dword [rsp + 0x20], r12d
mov rax, qword [rcx]
call qword [rax + 0x28]
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x28], rdx
lea r9, [rbp - 0x68]
lea rdx, [rbp - 0x4c]
xor r8d, r8d
mov qword [rsp + 0x20], rdx
lea rdx, str.__PATH
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, qword [rsp + 0x58]
lea rax, [rbp - 0x70]
mov rdx, qword [rbp - 0x60]
xor r9d, r9d
mov qword [rbp - 0x70], r12
mov r8, qword [rdi]
mov r10, qword [rcx]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
call qword [r10 + 0xc0]
lea rcx, [rbp - 0x28]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
lea rcx, [rbp - 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, r14d
lock xadd dword [rsi + 0x10], eax
cmp eax, 1
jne 0x1800f0381
mov rcx, qword [rsi]
test rcx, rcx
je 0x1800f0362
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsi], r12
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1800f0374
call sym.SafeBase64.dll_SafeBase_free
mov qword [rsi + 8], r12
mov edx, 0x18
mov rcx, rsi
call fcn.18001cc90
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
cmp eax, 1
jne 0x1800f03be
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800f039f
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1800f03b1
call sym.SafeBase64.dll_SafeBase_free
mov qword [rdi + 8], r12
mov edx, 0x18
mov rcx, rdi
call fcn.18001cc90
mov rcx, qword [rsp + 0x70]
test rcx, rcx
jne 0x1800f0150
mov edi, 1
test rbx, rbx
je 0x1800eff7f
lock xadd dword [rbx + 0x10], r14d
cmp r14d, edi
jmp 0x1800eff4d
lea rcx, [rbp - 0x40]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
jmp 0x1800f03cc
mov ecx, 0x8007000e
call fcn.180111950
int3
mov ecx, 0x8007000e
call fcn.180111950
int3