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

Disassembly:
push 0x34
mov eax, 0x4289c7
call fcn.004236b1
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x401fca
push eax
push ecx
mov edx, str.Failed_to_initialize_COM_library._Error_code__0x
mov ecx, 0x43dbe8
call fcn.00406a5f
mov ecx, eax
call fcn.00402e43
mov ecx, eax
call fcn.00402f44
push eax
call fcn.00406c0b
pop ecx
jmp 0x40222c
push ebx
push ebx
push ebx
push 3
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jns 0x40200a
push eax
push ecx
mov edx, str.Failed_to_initialize_security._Error_code__0x
mov ecx, 0x43dbe8
call fcn.00406a5f
mov ecx, eax
call fcn.00402e43
mov ecx, eax
call fcn.00402f44
push eax
call fcn.00406c0b
pop ecx
jmp 0x402226
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
push 0x43092c
xor edi, edi
inc edi
push edi
push ebx
push 0x4309fc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x402044
push eax
push ecx
mov edx, str.Failed_to_create_IWbemLocator_object.
mov ecx, 0x43dbe8
call fcn.00406a5f
mov edx, str._Err_code__0x
mov ecx, eax
jmp 0x401feb
push ecx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x1c], ebx
call fcn.00401ec3
mov dword [ebp - 4], ebx
mov eax, dword [eax]
test eax, eax
je 0x40205d
mov edx, dword [eax]
jmp 0x40205f
mov edx, ebx
mov eax, dword [ebp - 0x18]
lea esi, [ebp - 0x1c]
push esi
push ebx
push ebx
mov ecx, dword [eax]
push ebx
push ebx
push ebx
push ebx
push edx
push eax
call dword [ecx + 0xc]
or dword [ebp - 4], 0xffffffff
mov esi, eax
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x402085
call fcn.00401f3e
test esi, esi
jns 0x4020b7
push esi
push ecx
mov edx, str.Could_not_connect._Error_code__0x
mov ecx, 0x43dbe8
call fcn.00406a5f
mov ecx, eax
call fcn.00402e43
mov ecx, eax
call fcn.00402f44
push eax
call fcn.00406c0b
pop ecx
mov eax, dword [ebp - 0x18]
jmp 0x402220
mov esi, 0x43dbe8
mov edx, str.Connected_to_ROOTCIMV2_WMI_namespace
mov ecx, esi
call fcn.00406a5f
push eax
call fcn.00406c0b
pop ecx
push ebx
push ebx
push 3
push 3
push ebx
push ebx
push 0xa
push dword [ebp - 0x1c]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x402114
push eax
push ecx
mov edx, str.Could_not_set_proxy_blanket._Error_code__0x
mov ecx, esi
call fcn.00406a5f
mov ecx, eax
call fcn.00402e43
mov ecx, eax
call fcn.00402f44
push eax
call fcn.00406c0b
mov eax, dword [ebp - 0x1c]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x4020af
push str.SELECT__FROM_Win32_OperatingSystem
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x20], ebx
call fcn.00401e62
mov esi, eax
push 0x430d34
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], edi
call fcn.00401e62
mov byte [ebp - 4], 2
mov esi, dword [esi]
test esi, esi
je 0x402144
mov esi, dword [esi]
jmp 0x402146
mov esi, ebx
mov eax, dword [eax]
test eax, eax
je 0x402150
mov edx, dword [eax]
jmp 0x402152
mov edx, ebx
mov eax, dword [ebp - 0x1c]
lea edi, [ebp - 0x20]
push edi
push ebx
push 0x30
mov ecx, dword [eax]
push esi
push edx
push eax
call dword [ecx + 0x50]
mov ecx, dword [ebp - 0x3c]
mov esi, eax
test ecx, ecx
je 0x402175
call fcn.00401f3e
mov dword [ebp - 0x3c], ebx
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x402185
call fcn.00401f3e
test esi, esi
jns 0x4021a6
push esi
push ecx
mov edx, str.Query_for_operating_system_name_failed.
mov ecx, 0x43dbe8
call fcn.00406a5f
mov edx, str._Error_code__0x
mov ecx, eax
jmp 0x4020ef
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
jmp 0x402204
mov eax, dword [ecx]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 0x24]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
cmp dword [ebp - 0x14], 0
je 0x40220b
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x38]
push ebx
push ebx
push edx
mov ecx, dword [eax]
push ebx
push str.Name
push eax
call dword [ecx + 0x10]
call fcn.00406c3f
mov edx, dword [ebp - 0x30]
mov ecx, eax
call fcn.00406e7e
push eax
call fcn.00407036
pop ecx
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x4021ae
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
call fcn.00423660
ret