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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59e970
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x60a070]
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 bl, dl
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
xor ecx, ecx
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], cx
mov dword [ebp - 4], ecx
test eax, eax
je 0x4f25f2
cmp eax, 1
je 0x4f25f2
cmp eax, 0x80010106
je 0x4f25f2
push eax
push str.Failed_to_Coinitialize_in_getHardDiskSerialNumber._Error_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
add esp, 0x10
xor bl, bl
jmp 0x4f28e1
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 0x4f2639
cmp eax, 0x80010119
je 0x4f2639
push eax
push str.Failed_to_initialize_security._Error_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
add esp, 0x10
xor bl, bl
jmp 0x4f28e1
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
push 0x5ae2f4
push 1
push 0
push 0x5ae3c4
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x4f2680
push eax
push str.Failed_to_create_IWbemLocator_object._Err_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
add esp, 0x10
xor bl, bl
jmp 0x4f28e1
push str.ROOTCIMV2
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x30], 0
call fcn.004f2460
mov byte [ebp - 4], 1
mov eax, dword [eax]
test eax, eax
je 0x4f26a2
mov edx, dword [eax]
jmp 0x4f26a4
xor edx, edx
mov eax, dword [ebp - 0x2c]
lea esi, [ebp - 0x30]
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 byte [ebp - 4], 0
mov esi, eax
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4f26d0
call fcn.004f2520
test esi, esi
jns 0x4f2701
push esi
push str.Could_not_connect_while_getting_hdd_serial_number._Error_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
mov eax, dword [ebp - 0x2c]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor bl, bl
jmp 0x4f28e1
push 0
push 0
push 3
push 3
push 0
push 0
push 0xa
push dword [ebp - 0x30]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x4f2752
push eax
push str.Could_not_set_proxy_blanket._Error_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
mov eax, dword [ebp - 0x30]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor bl, bl
jmp 0x4f28e1
mov ecx, str.SELECT__FROM_Win32_DiskDrive_where_interfaceType___USB
test bl, bl
mov eax, str.SELECT__FROM_Win32_DiskDrive_where_interfaceType__USB
cmove eax, ecx
lea ecx, [ebp - 0x3c]
push eax
call fcn.004f23d0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
push 0x5e0008
mov dword [ebp - 0x34], 0
call fcn.004f23d0
mov byte [ebp - 4], 3
mov esi, dword [ebp - 0x3c]
test esi, esi
je 0x4f2791
mov edi, dword [esi]
jmp 0x4f2793
xor edi, edi
mov eax, dword [eax]
test eax, eax
je 0x4f279d
mov edx, dword [eax]
jmp 0x4f279f
xor edx, edx
mov eax, dword [ebp - 0x30]
lea ebx, [ebp - 0x34]
push ebx
push 0
push 0x30
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + 0x50]
mov byte [ebp - 4], 2
mov edi, eax
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x4f27c4
call fcn.004f2520
test edi, edi
jns 0x4f27fe
push edi
push str.Query_for_operating_system_name_failed._Error_code__0x_x
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
mov eax, dword [ebp - 0x30]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor bl, bl
jmp 0x4f28d6
mov ecx, dword [ebp - 0x34]
xor bl, bl
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x40], 0
test ecx, ecx
je 0x4f28be
mov edi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
mov eax, dword [ecx]
lea edx, [ebp - 0x40]
push edx
lea edx, [ebp - 0x38]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
cmp dword [ebp - 0x40], 0
je 0x4f28bb
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x58]
push 0
push 0
push edx
mov ecx, dword [eax]
push 0
push str.SerialNumber
push eax
call dword [ecx + 0x10]
test eax, eax
jns 0x4f287d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str._Failed_in_getting_serial_Error_is_:_d
push 0x5d4eac
push ecx
call fcn.004ebad0
add esp, 4
push eax
call fcn.004ec870
add esp, 0x10
jmp 0x4f28a5
cmp word [ebp - 0x58], 8
jne 0x4f289f
push dword [ebp - 0x50]
lea ecx, [ebp - 0x28]
call fcn.00413710
lea eax, [ebp - 0x28]
mov ecx, 0x61553c
push eax
call fcn.00413510
mov bl, 1
lea eax, [ebp - 0x58]
push eax
call edi
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 0x34]
test ecx, ecx
jne 0x4f2820
jmp 0x4f28be
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
je 0x4f28e1
mov ecx, esi
call fcn.004f2520
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x4f28f6
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00414580
mov al, bl
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.0055eeb4
mov esp, ebp
pop ebp
ret