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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x98
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
mov dword [ebp - 0x4c], eax
cmp ebx, 1
jle 0x40268e
lea esi, [eax + 4]
mov edi, 1
jmp 0x402648
inc edi
add esi, 4
cmp ebx, edi
je 0x40268e
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x4026b0
test byte [0x404030], 1
je 0x402640
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp], 0
inc edi
add esi, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.command_line_switch__s_not_supported_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404030
call sym._wine_dbg_log.constprop.0
cmp ebx, edi
jne 0x402648
mov eax, 0x65
mov ebx, 1
call sym._output_error
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [esp + 4], str.quit
mov dword [ebp - 0x50], eax
call eax
test eax, eax
je 0x4026df
mov dword [esp + 4], str.exit
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x4026f0
lea esp, [ebp - 0x10]
xor ebx, ebx
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 4], str.class
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
je 0x40271c
mov dword [esp + 4], str.context
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x40275d
test byte [0x404030], 1
je 0x40268e
mov eax, dword [esi]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.command__s_not_supported_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404030
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40268e
mov dword [esp + 4], str.path
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x402ca5
inc edi
cmp ebx, edi
jle 0x402d20
mov eax, dword [ebp - 0x4c]
mov esi, dword [eax + edi*4]
lea eax, [edi + 1]
cmp ebx, eax
jle 0x40268e
lea edx, [eax*4]
mov dword [esp + 4], 0x405100
mov dword [ebp - 0x54], edx
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + eax*4]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x40268e
lea ecx, [edi + 2]
mov edx, dword [ebp - 0x54]
cmp ebx, ecx
jle 0x40268e
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov edi, dword [eax + edx + 4]
test byte [0x404030], 8
jne 0x403049
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitialize]
sub esp, 4
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 3
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
lea eax, [ebp - 0x40]
sub esp, 0x24
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x405550
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x4054a0
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
jne 0x40308a
mov ebx, dword [sym.imp.oleaut32.dll_SysAllocString]
mov dword [esp], str.ROOTCIMV2
mov dword [ebp - 0x68], ebx
call ebx
mov dword [ebp - 0x64], eax
sub esp, 4
test eax, eax
je 0x40308a
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov edx, dword [eax]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp - 0x64]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x24
test eax, eax
jne 0x403150
mov dword [esp], esi
call ebx
mov dword [ebp - 0x58], eax
sub esp, 4
mov ecx, eax
test eax, eax
je 0x40312a
mov eax, dword [ebp - 0x3c]
lea ebx, [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 0x10], ebx
mov dword [esp + 4], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [edx + 0x18]
mov ecx, dword [ebp - 0x58]
mov ebx, eax
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
sub esp, 0x18
mov dword [esp], ecx
mov dword [ebp - 0x4c], eax
call eax
sub esp, 4
test ebx, ebx
jne 0x4030fc
mov eax, dword [ebp - 0x30]
mov dword [esp], edi
mov dword [ebp - 0x58], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov ebx, eax
test eax, eax
je 0x4030ef
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x50], eax
test eax, eax
je 0x4030dd
mov eax, dword [ebp - 0x50]
xor ecx, ecx
lea edi, [ebp - 0x28]
mov word [eax], cx
mov eax, dword [sym.imp.ucrtbase.dll_wcstok_s]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x40513e
mov dword [esp], ebx
mov dword [ebp - 0x5c], eax
call eax
mov ecx, eax
test eax, eax
je 0x402a99
mov dword [ebp - 0x54], ebx
movzx eax, word [ecx]
mov ebx, ecx
cmp ax, 0x20
jne 0x402d34
lea esi, [esi]
nop
add ebx, 2
cmp word [ebx], 0x20
je 0x4029e0
mov eax, ecx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4029f0
sub eax, ecx
sub eax, 2
add eax, ecx
jae 0x402a15
jmp 0x402a1b
xor edx, edx
sub eax, 2
mov word [eax + 2], dx
cmp eax, ecx
jb 0x402a1b
cmp word [eax], 0x20
je 0x402a08
mov edx, dword [ebp - 0x58]
mov eax, dword [edx]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], edx
call dword [eax + 0x10]
sub esp, 0x18
test eax, eax
js 0x402ffd
mov eax, dword [ebp - 0x50]
mov ecx, dword [sym.imp.ucrtbase.dll_wcscat]
cmp word [eax], 0
jne 0x402d08
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], ebx
mov dword [esp], eax
call ecx
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], 0x40513e
mov dword [esp], 0
call eax
mov ecx, eax
test eax, eax
jne 0x4029c9
mov ebx, dword [ebp - 0x54]
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [ebp - 0x5c], eax
call eax
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, esi
sub esp, 4
cmp word [esi], 0
je 0x402ac5
add eax, 2
cmp word [eax], 0
jne 0x402abc
sub eax, esi
sar eax, 1
mov edx, eax
mov eax, dword [ebp - 0x50]
cmp word [eax], 0
je 0x4030cd
add eax, 2
cmp word [eax], 0
jne 0x402ad8
sub eax, dword [ebp - 0x50]
mov dword [esp], 0
sar eax, 1
lea ebx, [edx + eax + 0xf]
mov dword [esp + 4], ebx
call dword [sym.imp.oleaut32.dll_SysAllocStringLen]
mov dword [ebp - 0x60], eax
sub esp, 8
test eax, eax
je 0x4030be
mov edx, dword [ebp - 0x50]
mov dword [esp + 0x10], esi
mov dword [esp + 4], ebx
mov ebx, eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.SELECT__s_FROM__s
mov dword [esp], eax
call sym._swprintf.constprop.0
mov dword [esp], 0x405142
mov eax, dword [ebp - 0x68]
call eax
mov dword [ebp - 0x58], eax
sub esp, 4
mov esi, eax
test eax, eax
je 0x4030d5
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x38]
mov edx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0x18
test eax, eax
jne 0x4030d5
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0x2c]
sub esp, 0x14
test eax, eax
je 0x402d47
mov eax, dword [ebp - 0x30]
lea ebx, [ebp - 0x34]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
mov esi, dword [sym.imp.oleaut32.dll_VariantClear]
sub esp, 8
lea esi, [esi]
nop
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 0x18
test eax, eax
jne 0x402c92
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantChangeType]
sub esp, 0x10
test eax, eax
jns 0x402c41
mov eax, edi
call sym._convert_to_bstr.part.0
mov edx, dword [ebp - 0x20]
cmp word [edx], 0
je 0x402c62
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402c50
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x54], eax
jb 0x402c7d
mov dword [esp], edi
call esi
mov eax, dword [ebp - 0x34]
sub esp, 4
mov dword [esp], eax
mov eax, dword [ebp - 0x4c]
call eax
sub esp, 4
jmp 0x402be0
mov eax, edx
nop
add eax, 2
cmp word [eax], 0
jne 0x402c80
sub eax, edx
sar eax, 1
mov dword [ebp - 0x54], eax
jmp 0x402c62
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x402b85
mov edx, dword [esi]
xor esi, esi
mov dword [ebp - 0x54], edi
mov eax, str.bios
mov dword [ebp - 0x58], ebx
mov edi, esi
mov ebx, dword [ebp - 0x50]
mov esi, edx
jmp 0x402cc4
mov eax, dword [edi*8 + 0x405600]
mov dword [esp + 4], eax
mov dword [esp], esi
call ebx
test eax, eax
je 0x402ceb
inc edi
cmp edi, 0xb
jne 0x402cbd
mov eax, 0x66
mov ebx, 1
call sym._output_error
jmp 0x40269d
mov esi, edi
mov ebx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x54]
mov esi, dword [esi*8 + 0x405604]
test esi, esi
jne 0x402786
jmp 0x402cd7
mov dword [ebp - 0x60], ecx
mov dword [esp + 4], 0x40513e
mov dword [esp], eax
call ecx
mov ecx, dword [ebp - 0x60]
jmp 0x402a68
mov eax, 0x68
mov ebx, 1
call sym._output_error
jmp 0x40269d
test ax, ax
jne 0x4029e9
mov eax, 0xfffffffe
jmp 0x4029fe
mov eax, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x68]
add eax, 2
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x38]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0xc]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0x2c]
sub esp, 0x14
test eax, eax
je 0x402e58
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
mov esi, dword [sym.imp.kernel32.dll_GetStdHandle]
push eax
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x68], eax
jmp 0x402df9
mov edx, dword [ebp - 0x34]
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x6c], edx
call esi
mov edx, dword [ebp - 0x6c]
sub esp, 4
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x54]
mov dword [esp + 4], str.__s
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._output_string
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
mov eax, dword [ebp - 0x4c]
call eax
sub esp, 4
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 0x18
test eax, eax
je 0x402dbb
mov dword [esp], 0xfffffff5
call esi
push ecx
mov dword [esp + 4], 0x405154
mov dword [esp], eax
call sym._output_string
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push esi
mov eax, dword [ebp - 0x38]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0xc]
mov dword [ebp - 0x68], ebx
sub esp, 4
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [edx + 0x10]
mov edx, dword [ebp - 0x2c]
sub esp, 0x14
test edx, edx
je 0x402f8a
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
mov ebx, dword [sym.imp.kernel32.dll_GetStdHandle]
sub esp, 8
jmp 0x402f21
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantChangeType]
sub esp, 0x10
test eax, eax
jns 0x402eeb
mov eax, edi
call sym._convert_to_bstr.part.0
mov esi, dword [ebp - 0x20]
mov dword [esp], 0xfffffff5
call ebx
mov edx, dword [ebp - 0x54]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], str.__s
mov dword [esp], eax
call sym._output_string
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantClear]
sub esp, 4
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 0x18
test eax, eax
je 0x402ec0
mov dword [esp], 0xfffffff5
call ebx
sub esp, 4
mov dword [esp + 4], 0x405154
mov dword [esp], eax
call sym._output_string
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x402e69
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x402f9f
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x402fb1
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x402fc3
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x64]
mov edi, dword [ebp - 0x4c]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x60]
sub esp, 4
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x58]
sub esp, 4
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40269d
mov ebx, dword [ebp - 0x54]
mov dword [esp], ebx
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x5c], ebx
call ebx
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x30]
or ebx, 0xffffffff
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push eax
mov eax, 0x67
call sym._output_error
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x58], 0
jmp 0x402f8d
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov ebx, eax
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._s___s_n
mov dword [esp + 8], str.query_prop
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4027f0
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x50], 0
or ebx, 0xffffffff
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x5c], eax
jmp 0x402f8d
mov dword [ebp - 0x58], 0
or ebx, 0xffffffff
jmp 0x402f8d
mov eax, dword [ebp - 0x50]
jmp 0x402ae1
or ebx, 0xffffffff
jmp 0x402f8d
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [ebp - 0x5c], eax
call eax
jmp 0x403016
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x5c], eax
jmp 0x403016
test byte [0x404030], 4
jne 0x40317d
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x50], 0
or ebx, 0xffffffff
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], eax
jmp 0x402f8d
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x50], 0
or ebx, 0xffffffff
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x5c], eax
jmp 0x402f8d
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x50], 0
or ebx, 0xffffffff
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], eax
jmp 0x402f8d
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Unrecognized_class__s._n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.query_prop
mov dword [esp + 4], 0x404030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x403105