Function at 0x50d244
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff254
xor ecx, ecx
mov dword [ebp - 0xdac], ecx
mov dword [ebp - 0xda8], ecx
mov dword [ebp - 0xda4], ecx
mov dword [ebp - 0xda0], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405738
xor eax, eax
push ebp
push 0x50d579
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x990]
xor ecx, ecx
mov edx, 0x968
call fcn.00403450
lea eax, [ebp - 0x99c]
xor ecx, ecx
mov edx, 0xc
call fcn.00403450
mov eax, dword [ebp - 8]
call fcn.00405278
lea eax, [ebp - 0xda0]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.004057a8
mov eax, dword [ebp - 0xda0]
mov edx, 0x50d58c
call fcn.00405694
je 0x50d2f2
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, 0x50d598
call fcn.00405594
jmp 0x50d344
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00405310
lea eax, [ebp - 0xda4]
push eax
mov eax, dword [ebp - 0xc]
call fcn.00405548
mov edx, eax
mov ecx, 1
mov eax, dword [ebp - 0xc]
call fcn.004057a8
mov eax, dword [ebp - 0xda4]
mov edx, 0x50d5a8
call fcn.00405694
jne 0x50d344
mov eax, dword [ebp - 0xc]
call fcn.00405548
mov edx, eax
lea eax, [ebp - 0xc]
mov ecx, 1
call fcn.004057e8
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x50d543
push 0
lea eax, [ebp - 0x14]
push eax
push 0x968
lea eax, [ebp - 0x990]
push eax
push 0
push 0
push 0x560000
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x21], al
cmp byte [ebp - 0x21], 0
je 0x50d47d
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 0x21], 0
je 0x50d543
lea eax, [ebp - 0x20]
call fcn.00405278
mov eax, dword [ebp - 0x990]
dec eax
test eax, eax
jl 0x50d430
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0x63
jge 0x50d428
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
call fcn.005a817c
mov edx, dword [ebp - 0x18]
lea edx, [edx + edx*2]
cmp eax, dword [ebp + edx*8 - 0x988]
jne 0x50d41c
push dword [ebp - 0x20]
push 0x50d5b4
lea edx, [ebp - 0xda8]
mov eax, dword [ebp - 0x1c]
call fcn.0040a83c
push dword [ebp - 0xda8]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00405608
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0xc8
jne 0x50d3dc
inc dword [ebp - 0x18]
dec dword [ebp - 0x28]
jne 0x50d3d1
lea eax, [ebp - 0xdac]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.004057a8
mov eax, dword [ebp - 0xdac]
mov edx, 0x50d5b4
call fcn.00405694
jne 0x50d46d
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, 1
call fcn.004057e8
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
call fcn.004052cc
jmp 0x50d543
push 0
lea eax, [ebp - 0x14]
push eax
push 0xc
lea eax, [ebp - 0x99c]
push eax
push 0
push 0
push 0x2d1080
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x21], al
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 0x21], 0
je 0x50d4f6
mov eax, dword [ebp - 0x998]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 8]
call fcn.0040a928
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
call fcn.005a817c
cmp eax, dword [ebp - 0x998]
jne 0x50d4e8
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
call fcn.0040a83c
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0xc8
jne 0x50d4cd
jmp 0x50d543
push 0x400
lea eax, [ebp - 0xd9c]
push eax
mov eax, dword [ebp - 4]
call fcn.00405748
push eax
call sub.kernel32.dll_QueryDosDeviceA
test eax, eax
jbe 0x50d543
lea eax, [ebp - 0x20]
lea edx, [ebp - 0xd9c]
mov ecx, 0x400
call fcn.004054f8
mov eax, dword [ebp - 0x20]
call fcn.0050cf9c
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jle 0x50d543
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.0040a83c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50d580
lea eax, [ebp - 0xdac]
mov edx, 4
call fcn.0040529c
lea eax, [ebp - 0x20]
call fcn.00405278
lea eax, [ebp - 0xc]
call fcn.00405278
lea eax, [ebp - 4]
call fcn.00405278
ret