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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x23a
push 0
push 0
dec ecx
jne 0x50d5c1
xchg dword [ebp - 4], ecx
push ebx
mov byte [ebp - 6], cl
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50d9a9
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp - 5], 0
je 0x50d5f4
mov eax, dword [ebp - 4]
call fcn.005a817c
mov dword [ebp - 4], eax
lea eax, [ebp - 0x9a8]
xor ecx, ecx
mov edx, 0x968
call fcn.00403450
lea eax, [ebp - 0x9b4]
xor ecx, ecx
mov edx, 0xc
call fcn.00403450
mov eax, dword [ebp + 8]
call fcn.00405278
lea eax, [ebp - 0xdb4]
push eax
push 0x400
call sub.kernel32.dll_GetLogicalDriveStringsA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x50d96b
lea eax, [ebp - 0xdb4]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
call fcn.00405278
jmp 0x50d6bf
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0x42
jbe 0x50d6bb
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetDriveTypeA
mov dword [ebp - 0x1c], eax
cmp byte [ebp - 6], 0
je 0x50d691
cmp dword [ebp - 0x1c], 2
jne 0x50d6bb
lea eax, [ebp - 0x11b8]
mov edx, dword [ebp - 0x20]
mov dl, byte [edx]
call fcn.00405460
mov edx, dword [ebp - 0x11b8]
lea eax, [ebp - 0x30]
call fcn.00405550
jmp 0x50d6bb
cmp dword [ebp - 0x1c], 3
je 0x50d69d
cmp dword [ebp - 0x1c], 2
jne 0x50d6bb
lea eax, [ebp - 0x11bc]
mov edx, dword [ebp - 0x20]
mov dl, byte [edx]
call fcn.00405460
mov edx, dword [ebp - 0x11bc]
lea eax, [ebp - 0x30]
call fcn.00405550
add dword [ebp - 0x20], 4
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0
jne 0x50d651
mov eax, dword [ebp - 0x30]
call fcn.00405548
test eax, eax
jle 0x50d923
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], 1
push 0x50d9c0
lea eax, [ebp - 0x11c0]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.00405460
push dword [ebp - 0x11c0]
push 0x50d9d0
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00405608
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 0x50d917
push 0
lea eax, [ebp - 0x14]
push eax
push 0x968
lea eax, [ebp - 0x9a8]
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 - 0x31], al
cmp byte [ebp - 0x31], 0
je 0x50d7e2
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x9a8]
dec eax
test eax, eax
jl 0x50d917
inc eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*2]
mov eax, dword [ebp + eax*8 - 0x9a0]
cmp eax, dword [ebp - 4]
jne 0x50d7d5
push dword [ebp - 0x28]
push 0x50d9dc
lea eax, [ebp - 0x11c4]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.00405460
push dword [ebp - 0x11c4]
push 0x50d9d0
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.00405608
inc dword [ebp - 0x1c]
dec dword [ebp - 0x3c]
jne 0x50d78e
jmp 0x50d917
push 0
lea eax, [ebp - 0x14]
push eax
push 0xc
lea eax, [ebp - 0x9b4]
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 - 0x31], al
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 0x31], 0
je 0x50d864
mov eax, dword [ebp - 0x9b0]
cmp eax, dword [ebp - 4]
jne 0x50d917
push dword [ebp - 0x28]
push 0x50d9dc
lea eax, [ebp - 0x11c8]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.00405460
push dword [ebp - 0x11c8]
push 0x50d9d0
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.00405608
jmp 0x50d917
lea eax, [ebp - 0x11cc]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x11cc]
lea eax, [ebp - 0x11d0]
call fcn.004032b0
mov edx, 0x50d9e0
lea eax, [ebp - 0x11d0]
mov cl, 2
call fcn.00403280
lea edx, [ebp - 0x11d0]
lea eax, [ebp - 0x2c]
call fcn.004054ec
push 0x400
lea eax, [ebp - 0x11b4]
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00405748
push eax
call sub.kernel32.dll_QueryDosDeviceA
test eax, eax
jbe 0x50d917
lea eax, [ebp - 0x24]
lea edx, [ebp - 0x11b4]
mov ecx, 0x400
call fcn.004054f8
mov eax, dword [ebp - 0x24]
call fcn.0050cf9c
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cdq
push edx
push eax
mov eax, dword [ebp - 4]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x50d8fb
cmp eax, dword [esp]
pop edx
pop eax
jne 0x50d917
push dword [ebp - 0x28]
push 0x50d9dc
push dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00405608
inc dword [ebp - 0x18]
dec dword [ebp - 0x38]
jne 0x50d6e1
lea eax, [ebp - 0x11d4]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x28]
call fcn.004057a8
mov eax, dword [ebp - 0x11d4]
mov edx, 0x50d9dc
call fcn.00405694
jne 0x50d960
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, 1
call fcn.004057e8
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x28]
call fcn.004052cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50d9b0
lea eax, [ebp - 0x11d4]
call fcn.00405278
lea eax, [ebp - 0x11c8]
mov edx, 5
call fcn.0040529c
lea eax, [ebp - 0x30]
mov edx, 4
call fcn.0040529c
lea eax, [ebp - 0xc]
call fcn.00405278
ret