Function at 0x40da80
Capabilities:
Connect to wmi namespace via wbemlocator
Get common file path
Reference wmi statements

Disassembly:
push 0xffffffffffffffff
push 0x428641
mov eax, dword fs:[0]
push eax
sub esp, 0x32c
mov eax, dword [0x431034]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push esi
push edi
mov eax, dword [0x431034]
xor eax, esp
push eax
lea eax, [esp + 0x33c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x34c]
push 0x104
lea ecx, [esp + 0x134]
push ecx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x40dae3
xor al, al
jmp 0x40dd72
xor esi, esi
push esi
xor edx, edx
push esi
mov word [esp + 0x13c], dx
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
call dword [sym.imp.ole32.dll_CoInitializeEx]
push esi
push esi
push esi
push 3
push esi
push esi
push esi
push 0xffffffffffffffff
push esi
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
lea eax, [esp + 0x1c]
push eax
push 0x42ef60
push 1
push esi
push 0x42f030
call dword [sym.imp.ole32.dll_CoCreateInstance]
push str..ROOTCIMV2
lea ecx, [esp + 0x24]
call fcn.0040d130
mov eax, dword [eax]
mov dword [esp + 0x344], esi
cmp eax, esi
je 0x40db4f
mov eax, dword [eax]
jmp 0x40db51
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
lea edi, [esp + 0x18]
push edi
push esi
push esi
push esi
push esi
push esi
push esi
push eax
mov eax, dword [edx + 0xc]
push ecx
call eax
test eax, eax
lea ecx, [esp + 0x20]
setl bl
mov dword [esp + 0x344], 0xffffffff
call fcn.0040d1e0
test bl, bl
jne 0x40dd16
mov ecx, dword [esp + 0x18]
push esi
push esi
push 3
push 3
push esi
push esi
push 0xa
push ecx
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jl 0x40dd16
push str.SELECT__FROM_Win32_DiskDrive
lea ecx, [esp + 0x30]
call fcn.0040d130
mov edi, eax
push 0x42a0a0
lea ecx, [esp + 0x24]
mov dword [esp + 0x348], 1
call fcn.0040d130
mov ecx, dword [edi]
mov byte [esp + 0x344], 2
cmp ecx, esi
je 0x40dbe2
mov ecx, dword [ecx]
jmp 0x40dbe4
xor ecx, ecx
mov eax, dword [eax]
cmp eax, esi
je 0x40dbee
mov edx, dword [eax]
jmp 0x40dbf0
xor edx, edx
mov eax, dword [esp + 0x18]
mov edi, dword [eax]
lea ebx, [esp + 0x14]
push ebx
push esi
push 0x30
push ecx
push edx
mov edx, dword [edi + 0x50]
push eax
call edx
test eax, eax
lea ecx, [esp + 0x20]
setl bl
call fcn.0040d1e0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x344], 0xffffffff
call fcn.0040d1e0
test bl, bl
jne 0x40dd16
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], esi
cmp eax, esi
je 0x40dd1e
test bl, bl
jne 0x40dd02
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x14]
push edx
push 1
push 0xffffffffffffffff
push eax
mov eax, dword [ecx + 0x10]
call eax
cmp dword [esp + 0x24], esi
je 0x40dcfa
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x14]
push str.DeviceID
call fcn.0040d3a0
add esp, 8
test al, al
je 0x40dcd6
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x130]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.0040d780
mov bl, al
add esp, 8
test bl, bl
je 0x40dcd6
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x14]
push str.SerialNumber
call fcn.0040d3a0
add esp, 8
test al, al
je 0x40dcd6
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x30]
push edx
push 0x429fe8
push eax
call fcn.004117f6
add esp, 0xc
mov ecx, dword [esp + 0x10]
cmp ecx, esi
je 0x40dcec
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push ecx
call eax
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x40dc44
jmp 0x40dd1e
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp eax, esi
je 0x40dd1e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x40dd1a
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp ecx, esi
je 0x40dd32
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], esi
cmp eax, esi
je 0x40dd42
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x40dd56
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x40dd6a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x1c], esi
call dword [sym.imp.ole32.dll_CoUninitialize]
mov al, 1
mov ecx, dword [esp + 0x33c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.0040ff55
add esp, 0x338
ret