Function at 0x1800f0410
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 0x1800f045a
xor eax, eax
jmp 0x1800f065f
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 0x1800f060f
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 0x1800f060f
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 0x1800f054e
call fcn.1800f3074
mov rbx, rax
test rax, rax
je 0x1800f0541
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 0x1800f0aa6
jmp 0x1800f0544
mov rbx, r12
test rbx, rbx
jne 0x1800f0591
jmp 0x1800f0aa6
call fcn.1800f3074
mov rbx, rax
test rax, rax
je 0x1800f0585
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 0x1800f0aa6
jmp 0x1800f0588
mov rbx, r12
test rbx, rbx
je 0x1800f0aa6
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 0x1800f067a
test rbx, rbx
je 0x1800f060f
lock xadd dword [rbx + 0x10], r14d
cmp r14d, 1
jne 0x1800f060f
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800f05f0
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], r12
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800f0602
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 0x1800f061f
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1800f062f
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 0x1800f05ce
mov ecx, 0x18
mov qword [rsp + 0x70], r12
call fcn.1800f3074
mov rdi, rax
test rax, rax
je 0x1800f0aa6
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 0x1800f0aa6
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 0x1800f0785
mov rcx, qword [rsi]
test rcx, rcx
je 0x1800f0766
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsi], r12
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1800f0778
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 0x1800f07c2
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800f07a3
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1800f07b5
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 0x1800f0a73
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 0x1800f0a73
test eax, eax
js 0x1800f0851
mov rcx, qword [rsp + 0x60]
lea r9, [rbp - 0x28]
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 0x1800f0847
cmp word [rbp - 0x28], r13w
jne 0x1800f0847
cmp dword [rbp - 0x20], r12d
je 0x1800f0a8f
lea rcx, [rbp - 0x28]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test edi, edi
js 0x1800f0a65
mov ecx, 0x18
call fcn.1800f3074
mov rdi, rax
test rax, rax
je 0x1800f0a9b
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 0x1800f0a9b
mov ecx, 0x18
call fcn.1800f3074
mov rsi, rax
test rax, rax
je 0x1800f0a9b
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 0x1800f0a9b
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 - 0x40]
mov word [rbp - 0x40], r13w
lea rdx, [0x1801646e0]
mov dword [rbp - 0x38], r12d
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]
mov edx, dword [rbp - 0x38]
lea rcx, str.SetAllowTSConnections__d__OK._n
test eax, eax
jns 0x1800f09d2
lea rcx, str.SetAllowTSConnections__d__FAILED._n
call fcn.1800f1d30
lea rcx, [rbp - 0x40]
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 0x1800f0a28
mov rcx, qword [rsi]
test rcx, rcx
je 0x1800f0a09
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsi], r12
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1800f0a1b
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 0x1800f0a65
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800f0a46
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1800f0a58
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 0x1800f07e0
mov edi, 1
test rbx, rbx
je 0x1800f060f
lock xadd dword [rbx + 0x10], r14d
cmp r14d, edi
jmp 0x1800f05dd
lea rcx, [rbp - 0x28]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
jmp 0x1800f0a73
mov ecx, 0x8007000e
call fcn.180111950
int3
mov ecx, 0x8007000e
call fcn.180111950
int3