Function at 0x510860
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x9ba2e3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], ebx
mov byte [ebp - 0x68], bl
mov eax, dword [ecx + 0xd0]
mov dword [ebp - 4], ebx
call eax
push eax
lea ecx, [ebp - 0x1c]
call fcn.004ec680
mov al, 0x41
mov byte [ebp - 0x18], al
lea esp, [esp]
movsx eax, al
sub eax, 0x41
cmp eax, 0x20
jae 0x510a8e
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
shr eax, 5
test dword [ebp + eax*4 - 0x1c], edx
setne al
cmp al, bl
je 0x510a5b
push 2
push 0x9c1838
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 0xf
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
call fcn.00478540
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x84]
push edi
push ecx
mov byte [ebp - 4], 1
call fcn.004ecad0
add esp, 0xc
mov esi, 0x10
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], esi
jb 0x510924
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
push eax
mov eax, dword [edx + 0xd4]
call eax
cmp eax, 3
sete byte [ebp - 0xd]
cmp dword [ebp - 0x70], esi
jb 0x51094b
mov ecx, dword [ebp - 0x84]
push ecx
call fcn.0095244c
add esp, 4
mov dword [ebp - 0x70], 0xf
mov dword [ebp - 0x74], ebx
mov byte [ebp - 0x84], bl
mov byte [ebp - 4], bl
cmp dword [ebp - 0x38], esi
jb 0x51096f
mov edx, dword [ebp - 0x4c]
push edx
call fcn.0095244c
add esp, 4
cmp byte [ebp - 0xd], bl
je 0x510a5b
push 4
push 0x9c1830
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 0xf
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
call fcn.00478540
push edi
push 1
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 3
call fcn.00477fe0
push 1
push 0x9bc89c
lea ecx, [ebp - 0x4c]
call fcn.004ec7e0
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], esi
jae 0x5109bd
lea eax, [ebp - 0x4c]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0xdc]
or edi, 0xffffffff
call ecx
mov esi, eax
cmp esi, 0xffffffff
je 0x510a46
mov ecx, dword [ebp - 0x14]
push ebx
lea edx, [ebp - 0x20]
push edx
mov edx, dword [ecx + 0xcc]
push 0xc
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push 0x2d1080
push esi
call edx
test eax, eax
je 0x510a00
mov edi, dword [ebp - 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x510a46
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x68]
push eax
push edi
mov ecx, esi
call fcn.004ff930
test eax, eax
jne 0x510a46
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x68]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edx
mov byte [ecx], bl
call fcn.00478090
mov ecx, esi
call fcn.00510640
cmp dword [ebp - 0x38], 0x10
mov byte [ebp - 4], bl
jb 0x510a5b
mov eax, dword [ebp - 0x4c]
push eax
call fcn.0095244c
add esp, 4
mov al, byte [ebp - 0x18]
inc al
mov byte [ebp - 0x18], al
cmp al, 0x5a
jle 0x5108b0
cmp dword [ebp - 0x54], 0x10
jb 0x510a7d
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.0095244c
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push str.invalid_bitset_N__position
call fcn.00964641
int3