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

Disassembly:
push 0x34
mov eax, 0x428a17
call fcn.00423701
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x40205e
push eax
push ecx
mov edx, str.Failed_to_initialize_COM_library._Error_code__0x
mov ecx, 0x43ebe8
call fcn.00406aa0
mov ecx, eax
call fcn.00402e84
mov ecx, eax
call fcn.00402f85
push eax
call fcn.00406c4c
pop ecx
jmp 0x4022c0
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 0x40209e
push eax
push ecx
mov edx, str.Failed_to_initialize_security._Error_code__0x
mov ecx, 0x43ebe8
call fcn.00406aa0
mov ecx, eax
call fcn.00402e84
mov ecx, eax
call fcn.00402f85
push eax
call fcn.00406c4c
pop ecx
jmp 0x4022ba
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
push 0x43093c
xor edi, edi
inc edi
push edi
push ebx
push 0x430a0c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x4020d8
push eax
push ecx
mov edx, str.Failed_to_create_IWbemLocator_object.
mov ecx, 0x43ebe8
call fcn.00406aa0
mov edx, str._Err_code__0x
mov ecx, eax
jmp 0x40207f
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 0x4020f1
mov edx, dword [eax]
jmp 0x4020f3
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 0x402119
call fcn.00401f3e
test esi, esi
jns 0x40214b
push esi
push ecx
mov edx, str.Could_not_connect._Error_code__0x
mov ecx, 0x43ebe8
call fcn.00406aa0
mov ecx, eax
call fcn.00402e84
mov ecx, eax
call fcn.00402f85
push eax
call fcn.00406c4c
pop ecx
mov eax, dword [ebp - 0x18]
jmp 0x4022b4
mov esi, 0x43ebe8
mov edx, str.Connected_to_ROOTCIMV2_WMI_namespace
mov ecx, esi
call fcn.00406aa0
push eax
call fcn.00406c4c
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 0x4021a8
push eax
push ecx
mov edx, str.Could_not_set_proxy_blanket._Error_code__0x
mov ecx, esi
call fcn.00406aa0
mov ecx, eax
call fcn.00402e84
mov ecx, eax
call fcn.00402f85
push eax
call fcn.00406c4c
mov eax, dword [ebp - 0x1c]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x402143
push str.SELECT__FROM_Win32_OperatingSystem
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x20], ebx
call fcn.00401e62
mov esi, eax
push 0x430d7c
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 0x4021d8
mov esi, dword [esi]
jmp 0x4021da
mov esi, ebx
mov eax, dword [eax]
test eax, eax
je 0x4021e4
mov edx, dword [eax]
jmp 0x4021e6
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 0x402209
call fcn.00401f3e
mov dword [ebp - 0x3c], ebx
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x402219
call fcn.00401f3e
test esi, esi
jns 0x40223a
push esi
push ecx
mov edx, str.Query_for_operating_system_name_failed.
mov ecx, 0x43ebe8
call fcn.00406aa0
mov edx, str._Error_code__0x
mov ecx, eax
jmp 0x402183
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
jmp 0x402298
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 0x40229f
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.00406c80
mov edx, dword [ebp - 0x30]
mov ecx, eax
call fcn.00406ebf
push eax
call fcn.00407077
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 0x402242
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.004236b0
ret