Function at 0x412780
Capabilities:
Get disk information
Get disk information via ioctl
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9eb9
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x50d080]
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 edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x44], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x44], 1
cmp byte [0x510ad0], al
jne 0x412855
mov ecx, 0x4f6cf8
call fcn.0040f280
mov ebx, eax
test ebx, ebx
je 0x41284e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CM_Get_Parent
push ebx
call esi
push str.CM_Get_Device_ID_Size
push ebx
mov dword [0x51051c], eax
call esi
push str.CM_Get_Device_IDW
push ebx
mov dword [0x510518], eax
call esi
push str.SetupDiGetClassDevsW
push ebx
mov dword [0x510514], eax
call esi
push str.SetupDiEnumDeviceInterfaces
push ebx
mov dword [0x510510], eax
call esi
push str.SetupDiGetDeviceInterfaceDetailW
push ebx
mov dword [0x51050c], eax
call esi
push str.SetupDiDestroyDeviceInfoList
push ebx
mov dword [0x510508], eax
call esi
mov dword [0x510504], eax
mov byte [0x510ad0], 1
cmp dword [0x51051c], 0
je 0x4129b8
cmp dword [0x510518], 0
je 0x4129b8
cmp dword [0x510514], 0
je 0x4129b8
cmp dword [0x510510], 0
je 0x4129b8
cmp dword [0x51050c], 0
je 0x4129b8
cmp dword [0x510508], 0
je 0x4129b8
cmp dword [0x510504], 0
je 0x4129b8
mov ecx, dword [ebp + 0xc]
and ecx, 0xffdf
lea eax, [ecx - 0x41]
cmp ax, 0x19
ja 0x4129b8
mov eax, dword [0x4f6eb8]
movq xmm0, qword [str..X:]
mov dword [ebp - 0x18], eax
mov eax, dword [0x4f6ebc]
mov dword [ebp - 0x14], eax
mov eax, dword [0x4f6ed0]
mov dword [ebp - 0x20], eax
mov ax, word [0x4f6ed4]
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x18]
push eax
mov word [ebp - 0x18], cx
movq qword [ebp - 0x28], xmm0
mov word [ebp - 0x20], cx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
jne 0x4129b8
push 0
push 0
push 3
push 0
push 3
push 0
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4129b8
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x30], 0xffffffff
push eax
push 0xc
lea eax, [ebp - 0x34]
mov dword [ebp - 0x48], 0
push eax
push 0
push 0
push 0x2d1080
push esi
or ebx, 0xffffffff
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
push esi
cmovne ebx, dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0xffffffff
je 0x4129b8
mov edx, ebx
lea ecx, [ebp - 0x40]
call fcn.004129e0
push eax
mov ecx, edi
call fcn.0040e350
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x4129b8
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4129ae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4129d8
push edx
push ecx
call fcn.0047cf1c
add esp, 8
mov eax, edi
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.0047cf2f
mov esp, ebp
pop ebp
ret 8
call fcn.004896af
int3