Function at 0x513170
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
push 0xffffffffffffffff
push 0x571760
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d7050]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov eax, dword [0x5e736c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5e736c
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x1c], ebp
xor ebx, ebx
push 2
push ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
cmp eax, ebx
jl 0x513276
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]
lea ecx, [esp + 0x18]
push ecx
push 0x586c24
push 1
push ebx
push 0x586cf4
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jge 0x513215
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [ebp - 0x10]
mov dword [esp + 0x54], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x51328e
lea ecx, [esp + 0x2c]
push ecx
mov edi, str.._rootMicrosoftHomeNet
mov dword [esp + 0x18], ebx
call fcn.0050b6d0
mov byte [esp + 0x54], 1
mov eax, dword [eax]
cmp eax, ebx
je 0x513237
mov eax, dword [eax]
jmp 0x513239
xor eax, eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
lea esi, [esp + 0x14]
push esi
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
mov eax, dword [edx + 0xc]
push ecx
call eax
lea edi, [esp + 0x2c]
mov esi, eax
mov byte [esp + 0x54], bl
call fcn.0050b770
cmp esi, ebx
jge 0x5132a4
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [ebp - 0x10]
mov dword [esp + 0x54], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51329a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x51346f
mov ecx, dword [esp + 0x14]
push ebx
push ebx
push 3
push 3
push ebx
push ebx
push 0xa
push ecx
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
cmp eax, ebx
jge 0x5132ee
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [esp + 0x1c]
call fcn.00410000
mov eax, 1
jmp 0x51346f
lea eax, [esp + 0x30]
push eax
mov edi, str.SELECT__FROM_HNet_ConnectionProperties
mov dword [esp + 0x24], ebx
call fcn.0050daf0
mov esi, eax
lea ecx, [esp + 0x2c]
push ecx
mov edi, 0x5ab8fc
mov byte [esp + 0x58], 2
call fcn.0050daf0
mov byte [esp + 0x54], 3
mov ecx, dword [esi]
cmp ecx, ebx
je 0x513326
mov ecx, dword [ecx]
jmp 0x513328
xor ecx, ecx
mov eax, dword [eax]
cmp eax, ebx
je 0x513332
mov edx, dword [eax]
jmp 0x513334
xor edx, edx
mov eax, dword [esp + 0x14]
mov esi, dword [eax]
lea edi, [esp + 0x20]
push edi
push ebx
push 0x20
push ecx
push edx
mov edx, dword [esi + 0x50]
push eax
call edx
lea edi, [esp + 0x2c]
mov esi, eax
call fcn.0050b770
lea edi, [esp + 0x30]
mov byte [esp + 0x54], bl
call fcn.0050b770
cmp esi, ebx
jge 0x513397
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [esp + 0x1c]
call fcn.00410000
mov eax, 1
jmp 0x51346f
cmp dword [esp + 0x5c], ebx
mov dword [esp + 0x28], ebx
lea edi, [esp + 0x1c]
mov edx, 0x5ab900
jne 0x5133af
mov edx, str.IsIcsPublic
call fcn.00410020
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x51343a
mov esi, dword [esp + 0x1c]
mov edi, dword [sym.imp.OLEAUT32.dll_VariantClear]
mov ebp, 0xb
jmp 0x5133d0
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x28]
push edx
push 1
push 0xffffffffffffffff
push eax
mov eax, dword [ecx + 0x10]
call eax
cmp dword [esp + 0x28], ebx
je 0x51343a
lea ecx, [esp + 0x34]
push ecx
call edi
mov eax, dword [esp + 0x24]
push ebx
lea ecx, [esp + 0x38]
push ecx
push ebx
mov word [esp + 0x40], bp
mov word [esp + 0x48], bx
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push esi
push eax
call edx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov ecx, dword [eax]
push ebx
push ebx
push 1
push edx
push eax
mov eax, dword [ecx + 0x38]
call eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x5133d0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [esp + 0x1c]
call fcn.00410000
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4