Function at 0x4b9988
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 0x4b9991
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 0x4b9d79
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp - 5], 0
je 0x4b99c4
mov eax, dword [ebp - 4]
call fcn.00524088
mov dword [ebp - 4], eax
lea eax, [ebp - 0x9a8]
xor ecx, ecx
mov edx, 0x968
call fcn.0040345c
lea eax, [ebp - 0x9b4]
xor ecx, ecx
mov edx, 0xc
call fcn.0040345c
mov eax, dword [ebp + 8]
call fcn.00405108
lea eax, [ebp - 0xdb4]
push eax
push 0x400
call sub.KERNEL32.DLL_GetLogicalDriveStringsA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4b9d3b
lea eax, [ebp - 0xdb4]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
call fcn.00405108
jmp 0x4b9a8f
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0x42
jbe 0x4b9a8b
mov eax, dword [ebp - 0x20]
push eax
call sub.KERNEL32.DLL_GetDriveTypeA
mov dword [ebp - 0x1c], eax
cmp byte [ebp - 6], 0
je 0x4b9a61
cmp dword [ebp - 0x1c], 2
jne 0x4b9a8b
lea eax, [ebp - 0x11b8]
mov edx, dword [ebp - 0x20]
mov dl, byte [edx]
call fcn.004052f0
mov edx, dword [ebp - 0x11b8]
lea eax, [ebp - 0x30]
call fcn.004053d0
jmp 0x4b9a8b
cmp dword [ebp - 0x1c], 3
je 0x4b9a6d
cmp dword [ebp - 0x1c], 2
jne 0x4b9a8b
lea eax, [ebp - 0x11bc]
mov edx, dword [ebp - 0x20]
mov dl, byte [edx]
call fcn.004052f0
mov edx, dword [ebp - 0x11bc]
lea eax, [ebp - 0x30]
call fcn.004053d0
add dword [ebp - 0x20], 4
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0
jne 0x4b9a21
mov eax, dword [ebp - 0x30]
call fcn.004053c8
test eax, eax
jle 0x4b9cf3
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], 1
push 0x4b9d90
lea eax, [ebp - 0x11c0]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.004052f0
push dword [ebp - 0x11c0]
push 0x4b9da0
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00405488
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x4b9ce7
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 0x4b9bb2
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x9a8]
dec eax
test eax, eax
jl 0x4b9ce7
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 0x4b9ba5
push dword [ebp - 0x28]
push 0x4b9dac
lea eax, [ebp - 0x11c4]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.004052f0
push dword [ebp - 0x11c4]
push 0x4b9da0
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.00405488
inc dword [ebp - 0x1c]
dec dword [ebp - 0x3c]
jne 0x4b9b5e
jmp 0x4b9ce7
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
cmp byte [ebp - 0x31], 0
je 0x4b9c34
mov eax, dword [ebp - 0x9b0]
cmp eax, dword [ebp - 4]
jne 0x4b9ce7
push dword [ebp - 0x28]
push 0x4b9dac
lea eax, [ebp - 0x11c8]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dl, byte [edx + ecx - 1]
call fcn.004052f0
push dword [ebp - 0x11c8]
push 0x4b9da0
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.00405488
jmp 0x4b9ce7
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.004032bc
mov edx, 0x4b9db0
lea eax, [ebp - 0x11d0]
mov cl, 2
call fcn.0040328c
lea edx, [ebp - 0x11d0]
lea eax, [ebp - 0x2c]
call fcn.0040536c
push 0x400
lea eax, [ebp - 0x11b4]
push eax
mov eax, dword [ebp - 0x2c]
call fcn.004055c8
push eax
call sub.KERNEL32.DLL_QueryDosDeviceA
test eax, eax
jbe 0x4b9ce7
lea eax, [ebp - 0x24]
lea edx, [ebp - 0x11b4]
mov ecx, 0x400
call fcn.00405378
mov eax, dword [ebp - 0x24]
call fcn.004b9860
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 0x4b9ccb
cmp eax, dword [esp]
pop edx
pop eax
jne 0x4b9ce7
push dword [ebp - 0x28]
push 0x4b9dac
push dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00405488
inc dword [ebp - 0x18]
dec dword [ebp - 0x38]
jne 0x4b9ab1
lea eax, [ebp - 0x11d4]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x28]
call fcn.00405628
mov eax, dword [ebp - 0x11d4]
mov edx, 0x4b9dac
call fcn.00405514
jne 0x4b9d30
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, 1
call fcn.00405668
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x28]
call fcn.0040515c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b9d80
lea eax, [ebp - 0x11d4]
call fcn.00405108
lea eax, [ebp - 0x11c8]
mov edx, 5
call fcn.0040512c
lea eax, [ebp - 0x30]
mov edx, 4
call fcn.0040512c
lea eax, [ebp - 0xc]
call fcn.00405108
ret