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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f711
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x419014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
push 0
mov dword [ebp - 0x14], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x40687e
push eax
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__Failed_to_initialize_COM_library._Error_code__0x_x
push 1
call fcn.00407340
add esp, 0x10
mov eax, 1
jmp 0x406c06
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]
test eax, eax
jns 0x4068bf
push eax
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__Failed_to_initialize_security._Error_code__0x_x
push 1
call fcn.00407340
add esp, 0x10
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, 1
jmp 0x406c06
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 0x4107e0
push 1
push 0
push 0x4107d0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x4068ef
push eax
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__Failed_to_create_IWbemLocator_object._Error_code__0x_x
jmp 0x4068a5
push ecx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x1c], 0
call fcn.00406c60
mov dword [ebp - 4], 0
mov eax, dword [eax]
test eax, eax
je 0x406910
mov edx, dword [eax]
jmp 0x406912
xor edx, edx
mov eax, dword [ebp - 0x20]
lea esi, [ebp - 0x1c]
push esi
push 0
push 0
mov ecx, dword [eax]
push 0
push 0
push 0
push 0
push edx
push eax
call dword [ecx + 0xc]
mov dword [ebp - 4], 0xffffffff
or edi, 0xffffffff
mov esi, dword [ebp - 0x3c]
mov ebx, eax
test esi, esi
je 0x406983
mov eax, edi
lock xadd dword [esi + 8], eax
dec eax
jne 0x406983
test esi, esi
je 0x406983
mov eax, dword [esi]
test eax, eax
je 0x406960
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x406978
push eax
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.0040d98a
add esp, 8
test ebx, ebx
jns 0x4069b5
push ebx
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__Could_not_connect._Error_code__0x_x
push 1
call fcn.00407340
mov eax, dword [ebp - 0x20]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, 1
jmp 0x406c06
push 0
push 0
push 3
push 3
push 0
push 0
push 0xa
push dword [ebp - 0x1c]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x406a07
push eax
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__Could_not_set_proxy_blanket._Error_code__0x_x
push 1
call fcn.00407340
mov eax, dword [ebp - 0x1c]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, 1
jmp 0x406c06
push str.SELECT__FROM_Win32_OperatingSystem
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x24], 0
call fcn.00406d10
mov esi, eax
push 0x413324
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 1
call fcn.00406d10
mov byte [ebp - 4], 2
mov esi, dword [esi]
test esi, esi
je 0x406a3f
mov esi, dword [esi]
jmp 0x406a41
xor esi, esi
mov eax, dword [eax]
test eax, eax
je 0x406a4b
mov edx, dword [eax]
jmp 0x406a4d
xor edx, edx
mov eax, dword [ebp - 0x1c]
lea ebx, [ebp - 0x24]
push ebx
push 0
push 0x30
mov ecx, dword [eax]
push esi
push edx
push eax
call dword [ecx + 0x50]
mov esi, dword [ebp - 0x3c]
mov ebx, eax
test esi, esi
je 0x406ab4
mov ecx, edi
lock xadd dword [esi + 8], ecx
dec ecx
jne 0x406aad
test esi, esi
je 0x406aad
mov eax, dword [esi]
test eax, eax
je 0x406a8a
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x406aa2
push eax
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.0040d98a
add esp, 8
mov dword [ebp - 0x3c], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x40]
test esi, esi
je 0x406b04
lock xadd dword [esi + 8], edi
dec edi
jne 0x406b04
test esi, esi
je 0x406b04
mov eax, dword [esi]
test eax, eax
je 0x406ae1
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x406af9
push eax
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.0040d98a
add esp, 8
test ebx, ebx
jns 0x406b18
push ebx
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push 0x413328
jmp 0x4069db
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
test ecx, ecx
je 0x406be3
mov edi, dword [sym.imp.OLEAUT32.dll_VariantClear]
mov esi, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__7]
mov ebx, dword [ebp - 0x14]
mov eax, dword [ecx]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp - 0x28]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
cmp dword [ebp - 0x18], 0
je 0x406be3
push 0x4110dc
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 3
push eax
call edi
lea eax, [ebp - 0x38]
push eax
call edi
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x38]
push 0
push 0
push edx
mov ecx, dword [eax]
push 0
push str.RegisteredUser
push eax
call dword [ecx + 0x10]
push dword [ebp - 0x30]
push str.CscEscppPrintChaserLogTransDlg::get_window_info
push str.__s__..._RegisteredUser_:__s
push 1
call fcn.00407340
mov eax, dword [ebp - 0x30]
add esp, 0x10
test eax, eax
je 0x406bbf
push eax
push 0x410e3c
push ebx
call esi
add esp, 0xc
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov ecx, dword [ebp - 0x24]
test ecx, ecx
jne 0x406b40
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 4