Function at 0x40d350
Capabilities:
Reference sql statements
Reference wmi statements

Disassembly:
push 0xffffffffffffffff
push 0x467d20
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x487bb0]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
xor edi, edi
push str.SELECT__FROM_Win32_DiskDrive_WHERE__SerialNumber_IS_NOT_NULL__AND__InterfaceType____USB_
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], edi
call fcn.0040d170
mov esi, eax
push 0x46e130
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3c], edi
call fcn.0040d170
mov ecx, dword [esi]
mov byte [esp + 0x38], 1
cmp ecx, edi
je 0x40d3ae
mov edx, dword [ecx]
jmp 0x40d3b0
xor edx, edx
mov eax, dword [eax]
cmp eax, edi
je 0x40d3ba
mov ecx, dword [eax]
jmp 0x40d3bc
xor ecx, ecx
mov eax, dword [esp + 0x40]
mov esi, dword [eax]
lea ebx, [esp + 0x14]
push ebx
push edi
push 0x30
push edx
push ecx
push eax
mov eax, dword [esi + 0x50]
call eax
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ebp, eax
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40d41c
mov esi, eax
add eax, 8
push eax
call ebx
cmp eax, edi
jne 0x40d418
cmp esi, edi
je 0x40d418
mov eax, dword [esi]
cmp eax, edi
je 0x40d3ff
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40d40f
push eax
call fcn.0044fc16
add esp, 4
push esi
call fcn.0044fc16
add esp, 4
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
cmp esi, edi
je 0x40d460
lea ecx, [esi + 8]
push ecx
call ebx
test eax, eax
jne 0x40d460
cmp esi, edi
je 0x40d460
mov eax, dword [esi]
cmp eax, edi
je 0x40d447
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40d457
push eax
call fcn.0044fc16
add esp, 4
push esi
call fcn.0044fc16
add esp, 4
cmp ebp, edi
jl 0x40d61f
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x40d617
mov esi, dword [esp + 0x44]
mov ebp, dword [sym.imp.OLEAUT32.dll_VariantClear]
mov ebx, dword [sym.imp.OLEAUT32.dll_VariantCopy]
jmp 0x40d488
xor edi, edi
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x44]
push ecx
push 1
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
push 0xffffffffffffffff
push eax
call edx
cmp dword [esp + 0x44], edi
je 0x40d613
cmp dword [esi + 0x14], edi
jne 0x40d613
lea eax, [esp + 0x20]
push eax
call ebp
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
push edi
push edi
lea edx, [esp + 0x28]
push edx
push edi
push str.SerialNumber
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00466d70
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40d4e8
sub ecx, edi
push ecx
push eax
mov ecx, esi
call fcn.00403100
lea edx, [esp + 0x20]
push edx
call ebx
cmp dword [esi + 0x14], 0
je 0x40d5f9
lea eax, [esp + 0x20]
push eax
call ebp
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
push 0
push 0
lea edx, [esp + 0x28]
push edx
push 0
push str.PNPDeviceID
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00466d70
mov ecx, eax
lea edi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40d540
sub ecx, edi
push ecx
push eax
mov ecx, esi
call fcn.00403100
lea edx, [esp + 0x20]
push edx
call ebx
lea eax, [esp + 0x20]
push eax
call ebp
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
push 0
push 0
lea edx, [esp + 0x28]
push edx
push 0
push str.Model
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00466d70
mov ecx, eax
lea edi, [ecx + 1]
jmp 0x40d590
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40d590
sub ecx, edi
push ecx
push eax
mov ecx, esi
call fcn.00403100
lea edx, [esp + 0x20]
push edx
call ebx
lea eax, [esp + 0x20]
push eax
call ebp
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
push 0
push 0
lea edx, [esp + 0x28]
push edx
push 0
push 0x46e0d8
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00466d70
mov ecx, eax
lea edi, [ecx + 1]
jmp 0x40d5e0
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40d5e0
sub ecx, edi
push ecx
push eax
mov ecx, esi
call fcn.00403100
lea edx, [esp + 0x20]
push edx
call ebx
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40d486
jmp 0x40d617
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8