Function at 0x40a120
Capabilities:
Check os version
Connect to wmi namespace via wbemlocator
Reference sql statements

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x6cc
push ebx
push esi
push edi
mov edi, dword [0x446258]
xor esi, esi
lea eax, [ebp - 0x54]
push eax
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x74], esi
mov dword [ebp + 0x70], esi
mov dword [ebp + 0x6c], esi
xor ebx, ebx
mov dword [ebp - 0x54], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x44], 2
je 0x40a162
xor eax, eax
jmp 0x40a373
lea eax, [ebp + 0x64]
push eax
push 0x437040
push 1
push esi
push 0x437030
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40a34a
mov eax, dword [ebp + 0x64]
mov ecx, dword [eax]
lea edx, [ebp + 0x74]
push edx
push esi
push esi
push esi
push esi
push esi
push esi
push str.ROOTCIMV2
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x40a34a
push 0x20
push esi
push 3
push 6
push esi
push esi
push 0xa
push dword [ebp + 0x74]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
cmp edi, esi
jne 0x40a1c7
lea edx, [ebp + 0x70]
push edx
push esi
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE0
jmp 0x40a1fe
cmp edi, 1
jne 0x40a1da
lea edx, [ebp + 0x70]
push edx
push esi
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE1
jmp 0x40a1fe
cmp edi, 2
jne 0x40a1ed
lea edx, [ebp + 0x70]
push edx
push esi
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE2
jmp 0x40a1fe
cmp edi, 3
jne 0x40a20c
lea edx, [ebp + 0x70]
push edx
push esi
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE3
mov eax, dword [ebp + 0x74]
mov ecx, dword [eax]
push 0x437088
push eax
call dword [ecx + 0x50]
cmp eax, esi
jl 0x40a34a
mov eax, dword [ebp + 0x70]
lea edx, [ebp + 0x50]
push edx
lea edx, [ebp + 0x6c]
push edx
push 1
push 0xffffffffffffffff
mov dword [ebp + 0x50], esi
mov dword [ebp + 0x6c], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
cmp eax, esi
jl 0x40a34a
cmp dword [ebp + 0x6c], esi
jne 0x40a245
cmp eax, esi
je 0x40a214
jmp 0x40a34a
lea eax, [ebp + 0x40]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [ebp + 0x6c]
mov ecx, dword [eax]
push esi
push esi
lea edx, [ebp + 0x40]
push edx
push esi
push str.SerialNumber
push eax
call dword [ecx + 0x10]
mov edi, dword [ebp + 0x48]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x14
mov dword [ebp + 0x60], eax
jle 0x40a312
cmp dword [ebp - 0x50], 6
jne 0x40a312
push 0x200
lea eax, [ebp - 0x254]
push esi
push eax
mov word [ebp + 0x5c], si
call fcn.004166f0
add esp, 0xc
cmp dword [ebp + 0x60], esi
mov dword [ebp + 0x68], esi
jle 0x40a2f7
add edi, 4
mov ax, word [edi - 4]
mov word [ebp + 0x54], ax
mov ax, word [edi - 2]
mov word [ebp + 0x56], ax
mov ax, word [edi]
mov word [ebp + 0x58], ax
mov ax, word [edi + 2]
push 0x10
mov word [ebp + 0x5a], ax
lea eax, [ebp + 0x54]
push esi
push eax
call fcn.00417738
mov ecx, eax
mov eax, dword [ebp + 0x68]
add esp, 0xc
cdq
push 4
pop ebx
idiv ebx
add dword [ebp + 0x68], ebx
add edi, 8
mov word [ebp + eax*2 - 0x254], cx
mov eax, dword [ebp + 0x68]
cmp eax, dword [ebp + 0x60]
jl 0x40a2a8
push 0x400
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x654]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x40a32b
push esi
push esi
push 0x400
lea eax, [ebp - 0x654]
push eax
push 0xffffffffffffffff
push edi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x654]
push eax
push 0x446ff0
call fcn.00416770
mov eax, dword [ebp + 0x6c]
pop ecx
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor ebx, ebx
inc ebx
mov eax, dword [ebp + 0x70]
cmp eax, esi
je 0x40a357
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp + 0x74]
cmp eax, esi
je 0x40a364
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp + 0x64]
cmp eax, esi
je 0x40a371
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret