Function at 0x40a9bc
Capabilities:
Check os version
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
mov eax, 0x50f000
call fcn.004f505c
mov word [ebp - 0x14], 0xc
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax + 4], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax + 0x10], edx
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x14], eax
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax + 0x1c], edx
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x20], eax
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x24], ecx
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax + 0x28], edx
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x30], ecx
xor eax, eax
mov dword [ebp - 0x28], eax
call sub.KERNEL32.DLL_GetVersion
mov dword [ebp - 0x2c], eax
test byte [ebp - 0x29], 0x80
jne 0x40aa61
mov dl, byte [ebp - 0x2c]
mov byte [ebp - 0x2d], dl
cmp byte [ebp - 0x2d], 5
jb 0x40aa61
mov dword [ebp - 0x28], 1
cmp dword [ebp - 0x28], 0
jne 0x40aa75
mov ecx, dword [ebp + 8]
mov dword [ecx], 1
jmp 0x40ab70
mov dword [ebp - 0x34], str.setupapi.dll
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, dword [ebp + 8]
mov dword [edx + 0x10], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
jne 0x40aab4
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_LoadLibraryA
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
je 0x40aab4
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], 1
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x10], 0
jne 0x40aad6
mov eax, dword [ebp + 8]
mov dword [eax], 2
call sub.KERNEL32.DLL_GetLastError
mov edx, dword [ebp + 8]
mov dword [edx + 4], eax
jmp 0x40ab70
push str.CM_Locate_DevNodeA
mov ecx, dword [ebp + 8]
push dword [ecx + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], eax
push str.CM_Get_Child
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x1c], eax
push str.CM_Get_Sibling
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp + 8]
mov dword [edx + 0x20], eax
push str.CM_Get_DevNode_Status
mov ecx, dword [ebp + 8]
push dword [ecx + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp + 8]
mov dword [edx + 0x24], eax
push str.CM_Get_Device_ID_Size
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28], eax
push str.CM_Get_Device_IDA
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp + 8]
mov dword [edx + 0x2c], eax
push str.CM_Request_Device_EjectA
mov ecx, dword [ebp + 8]
push dword [ecx + 0x10]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp + 8]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 0x24]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret