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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a86d
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
push edi
mov eax, dword [0x4a90d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x4aa574]
push 0xf
push str.SerialNumber
push str.SELECT_SerialNumber_FROM_Win32_BIOS_WHERE_PrimaryBIOS__TRUE
mov esi, dword [eax + 0x24]
mov ecx, esi
push str.GetWMIData___Called_using_query___ls__for_item_name___ls_
push 0x4aa574
call dword [0x47d42c]
call esi
add esp, 0x14
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov edi, eax
cmp edi, 0x80010106
jne 0x40708a
mov ecx, dword [0x4aa574]
push 1
push str.GetWMIData___Failed_to_call_CoInitializeEx__hResult__RPC_E_CHANGED_MODE_
push 0x4aa574
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0xc
jmp 0x40708e
test edi, edi
jns 0x4070c3
mov eax, dword [0x4aa574]
push 1
push edi
push str.GetWMIData___Failed_to_call_CoInitializeEx__hResult__0x_08x_
mov esi, dword [eax + 0x14]
mov ecx, esi
push 0x4aa574
call dword [0x47d42c]
call esi
add esp, 0x10
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 0
push eax
push 0x4a28ac
push 1
push 0
push 0x499cc4
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40737c
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x20]
push ecx
push 0
push 0
mov esi, dword [eax]
push 0
push 0
push 0
mov esi, dword [esi + 0xc]
mov ecx, esi
push 0
push str.ROOTCIMV2
push eax
call dword [0x47d42c]
call esi
test eax, eax
js 0x40733d
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
js 0x407333
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
push ecx
push 0
push 0x30
mov esi, dword [eax]
push str.SELECT_SerialNumber_FROM_Win32_BIOS_WHERE_PrimaryBIOS__TRUE
push 0x4a1d1c
push eax
mov esi, dword [esi + 0x50]
mov ecx, esi
call dword [0x47d42c]
call esi
test eax, eax
js 0x4072f4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x407319
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x24], 0
mov esi, dword [eax]
push ecx
push 1
push 0xffffffffffffffff
mov esi, dword [esi + 0x10]
mov ecx, esi
push eax
call dword [0x47d42c]
call esi
test eax, eax
js 0x4072d0
cmp dword [ebp - 0x24], 0
je 0x4072ac
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x407228
lea eax, [ebp - 0x34]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x34], xmm0
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x34]
mov eax, dword [ebp - 0x18]
push 0
push 0
push ecx
mov esi, dword [eax]
push 0
push str.SerialNumber
push eax
mov esi, dword [esi + 0x10]
mov ecx, esi
call dword [0x47d42c]
call esi
test eax, eax
js 0x40721b
cmp word [ebp - 0x34], 8
je 0x407250
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 2
test eax, eax
je 0x407240
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x47d42c]
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x407192
jmp 0x407319
mov edx, dword [ebp - 0x2c]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407260
sub ecx, esi
sar ecx, 1
push ecx
push edx
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call fcn.00437be4
add esp, 0x14
mov byte [ebp - 0xd], 1
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x407316
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x47d42c]
call esi
jmp 0x407316
push 0xf
push eax
mov eax, dword [0x4aa574]
push str.GetWMIData___Returned_count_of_zero__hResult__0x_08x_
push 0x4aa574
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0x10
jmp 0x40728f
push 1
push eax
mov eax, dword [0x4aa574]
push str.GetWMIData___Failed_to_wbemEnumerator.Next___failed__hResult__0x_08x_
push 0x4aa574
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0x10
jmp 0x40728f
push 1
push eax
mov eax, dword [0x4aa574]
push str.GetWMIData___Failed_to_execute_the_provided_query_against_the_WMI_service__hResult__0x_08x_
push 0x4aa574
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 1
test eax, eax
je 0x40735f
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x47d42c]
call esi
jmp 0x40735f
push 1
push eax
push str.GetWMIData___Failed_to_set_up_the_proxy_to_the_WMI_service__hResult__0x_08x_
jmp 0x407345
push 1
push eax
push str.GetWMIData___Failed_to_connect_to_WMI__hResult__0x_08x_
mov eax, dword [0x4aa574]
push 0x4aa574
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0x10
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40739e
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x47d42c]
call esi
jmp 0x40739e
push 1
push eax
mov eax, dword [0x4aa574]
push str.GetWMIData___Failed_to_locate_WMI__hResult__0x_08x_
push 0x4aa574
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x47d42c]
call esi
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4073bc
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x47d42c]
call esi
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [0x4aa574]
push 0xf
push str.SerialNumber
push str.SELECT_SerialNumber_FROM_Win32_BIOS_WHERE_PrimaryBIOS__TRUE
mov esi, dword [ecx + 0x24]
mov ecx, esi
push str.GetWMIData___Completed_query___ls__for_item_name___ls_
push 0x4aa574
call dword [0x47d42c]
call esi
mov al, byte [ebp - 0xd]
add esp, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret