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

Disassembly:
push 0xffffffffffffffff
push 0x4595c8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x468004]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov dword [esi + 0x14], eax
test eax, eax
jge 0x406a20
push str.Failed_to_initialize_COM_library._Error_code__0x
push 0x4704f8
call fcn.00406160
add esp, 8
test eax, eax
jne 0x4069d4
xor edx, edx
jmp 0x4069db
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
add edx, eax
mov ecx, dword [edx + 0x10]
and ecx, 0xfffff9ff
or ecx, 0x800
mov dword [edx + 0x10], ecx
mov edx, dword [esi + 0x14]
push edx
mov ecx, eax
call fcn.00406440
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00406590
mov ecx, esi
call fcn.00405840
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push 0
push 0
push 0
push 3
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
mov dword [esi + 0x14], eax
test eax, eax
jge 0x406a98
push str.Failed_to_initialize_security._Error_code__0x
push 0x4704f8
call fcn.00406160
add esp, 8
test eax, eax
jne 0x406a59
xor edx, edx
jmp 0x406a60
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
add edx, eax
mov ecx, dword [edx + 0x10]
and ecx, 0xfffff9ff
or ecx, 0x800
mov dword [edx + 0x10], ecx
mov edx, dword [esi + 0x14]
push edx
mov ecx, eax
call fcn.00406440
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00406590
mov ecx, edi
call fcn.00405840
cmp dword [esi + 0x14], 0x80010119
jne 0x406b14
mov ebp, dword [sym.imp.ole32.dll_CoCreateInstance]
push esi
push 0x45ef44
push 1
push 0
push 0x45f014
call ebp
mov dword [esi + 0x14], eax
test eax, eax
jge 0x406b30
push str.Err_code__0x
push str.Failed_to_create_IWbemLocator_object.
push 0x4704f8
call fcn.00406160
add esp, 8
push eax
call fcn.00406160
add esp, 8
test eax, eax
jne 0x406ade
xor edx, edx
jmp 0x406ae5
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
add edx, eax
mov ecx, dword [edx + 0x10]
and ecx, 0xfffff9ff
or ecx, 0x800
mov dword [edx + 0x10], ecx
mov edx, dword [esi + 0x14]
push edx
mov ecx, eax
call fcn.00406440
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00406590
mov ecx, esi
call fcn.00405840
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push str.ROOTCIMV2
lea ecx, [esp + 0x20]
call fcn.00401f30
mov eax, dword [eax]
mov dword [esp + 0x30], 0
test eax, eax
je 0x406b50
mov ecx, dword [eax]
jmp 0x406b52
xor ecx, ecx
mov eax, dword [esi]
mov edx, dword [eax]
lea ebx, [esi + 4]
push ebx
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [esp + 0x1c]
mov dword [esi + 0x14], eax
mov dword [esp + 0x30], 0xffffffff
call fcn.00403ca0
mov eax, dword [esi + 0x14]
test eax, eax
jge 0x406be6
push eax
push 0x4014d0
push str.Could_not_connect._Error_code__0x
push 0x4704f8
call fcn.00406160
add esp, 8
mov ecx, eax
call fcn.00401840
mov ecx, eax
call fcn.00406440
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00406590
mov ecx, edi
call fcn.00405840
mov esi, dword [esi]
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push str.Connected_to_ROOTCIMV2_WMI_namespace
push 0x4704f8
call fcn.00406160
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00406590
mov ecx, edi
call fcn.00405840
mov eax, dword [ebx]
push 0
push 0
push 3
push 3
push 0
push 0
push 0xa
push eax
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
mov dword [esi + 0x14], eax
test eax, eax
jge 0x406c90
push eax
push 0x4014d0
push str.Could_not_set_proxy_blanket._Error_code__0x
push 0x4704f8
call fcn.00406160
add esp, 8
mov ecx, eax
call fcn.00401840
mov ecx, eax
call fcn.00406440
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00406590
mov ecx, edi
call fcn.00405840
mov ebx, dword [ebx]
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
push ebx
call edx
mov esi, dword [esi]
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
lea edx, [esp + 0x14]
push edx
push 0x45ef94
push 4
push 0
push 0x45f034
mov dword [esp + 0x28], 0
call ebp
push 0x14
mov dword [esi + 0x14], eax
call fcn.0042da69
add esp, 4
test eax, eax
je 0x406cc7
mov ecx, eax
call fcn.004028f0
jmp 0x406cc9
xor eax, eax
mov dword [esi + 0x18], eax
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov ecx, dword [esi + 0x18]
lea eax, [esi + 0x1c]
push eax
call fcn.00401760
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 0x18]
mov ecx, dword [eax]
lea ebp, [esi + 0xc]
push ebp
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov eax, dword [ebp]
mov ecx, dword [eax]
mov edx, dword [ecx]
lea edi, [esi + 0x10]
push edi
push 0x45ef54
push eax
call edx
push str.SELECT__FROM___InstanceCreationEvent_WITHIN_3WHERE_TargetInstance_ISA_Win32_Thread
lea ecx, [esp + 0x28]
call fcn.00401ea0
mov dword [esp + 0x1c], eax
push 0x45b730
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], 1
call fcn.00401ea0
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
xor edx, edx
mov byte [esp + 0x30], 2
cmp ecx, edx
je 0x406d48
mov ecx, dword [ecx]
mov dword [esp + 0x18], ecx
jmp 0x406d4c
mov dword [esp + 0x18], edx
mov eax, dword [eax]
cmp eax, edx
je 0x406d54
mov edx, dword [eax]
mov eax, dword [ebx]
mov ecx, dword [eax]
mov dword [esp + 0x1c], edx
mov edx, dword [edi]
push edx
mov edx, dword [esp + 0x1c]
push 0
push 0x80
push edx
mov edx, dword [esp + 0x2c]
push edx
push eax
mov eax, dword [ecx + 0x5c]
call eax
lea ecx, [esp + 0x20]
mov dword [esi + 0x14], eax
call fcn.00403ca0
lea ecx, [esp + 0x24]
mov dword [esp + 0x30], 0xffffffff
call fcn.00403ca0
mov eax, dword [esi + 0x14]
test eax, eax
jge 0x406e05
push eax
push str.ExecNotificationQueryAsync_failed_with__0x_X_n
call fcn.0042dad9
mov ebx, dword [ebx]
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
add esp, 8
push ebx
call edx
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ebp, dword [ebp]
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov esi, dword [esi + 0x18]
mov edx, dword [esi]
mov eax, dword [edx + 8]
push esi
call eax
mov edi, dword [edi]
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret