Function at 0x41f4c0
Capabilities:
Get disk information
Get disk information via ioctl
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f4d4
sub eax, edx
cmp eax, 2
jne 0x41f504
cmp byte [edi + 1], 0x3a
jne 0x41f504
push edi
push str.._s
lea eax, [ebp - 0x158]
push 0x104
push eax
call fcn.0041fef0
add esp, 0x10
jmp 0x41f559
push 0xb
push edi
push str._Volume
call dword [sym.imp.MSVCR71.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41f552
lea ecx, [edi + 4]
push ecx
push str.._s
lea edx, [ebp - 0x158]
push 0x104
push edx
call fcn.0041fef0
lea eax, [ebp - 0x158]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f540
sub eax, edx
mov byte [ebp + eax - 0x159], cl
jmp 0x41f559
mov byte [ebp - 0x158], 0
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 4], ebx
jne 0x41f5ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x41f5ba
push esi
push esi
call fcn.0041fc50
add esp, 4
push eax
push str.opening_volume_device
lea ecx, [ebp - 4]
push str.error__s:__s___d_
push ecx
call fcn.0041ff50
mov edx, dword [ebp + 0x34]
add esp, 0x14
pop edi
mov dword [edx], eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f5c0
sub eax, edx
cmp eax, 2
jne 0x41f5f0
cmp byte [edi + 1], 0x3a
jne 0x41f5f0
push edi
push 0x42af40
lea eax, [ebp - 0x158]
push 0x104
push eax
call fcn.0041fef0
add esp, 0x10
jmp 0x41f62b
push 0xb
push edi
push str._Volume
call dword [sym.imp.MSVCR71.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41f624
lea ecx, [edi + 4]
push ecx
push str.._s
lea edx, [ebp - 0x158]
push 0x104
push edx
call fcn.0041fef0
add esp, 0x10
jmp 0x41f62b
mov byte [ebp - 0x158], 0
push 0
lea eax, [ebp - 0xc]
push eax
push 0xc
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0x2d1080
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call ebx
test eax, eax
jne 0x41f7a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x57
je 0x41f686
cmp esi, 1
je 0x41f686
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x34]
push eax
push esi
push str.reading_volumes_disk_device_number
call fcn.0041e6b0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x14]
push edx
mov ecx, edi
call fcn.0041ed80
mov esi, eax
add esp, 8
cmp esi, 0x57
jne 0x41f6d2
or eax, 0xffffffff
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x41f6f9
cmp eax, 3
je 0x41f6f9
mov edi, dword [ebp - 4]
xor ecx, ecx
mov dword [ebp - 0x18], 0
xor edx, edx
jmp 0x41f7f6
test esi, esi
je 0x41f6a8
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x34]
push ecx
push esi
push str.reading_volumes_disk_device_number
call fcn.0041e6b0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x18], 7
mov edi, dword [ebp - 4]
push 0
lea eax, [ebp - 0xc]
push eax
push 0x104
lea ecx, [ebp - 0x25c]
push ecx
push 0
push 0
push 0x560000
push edi
call ebx
test eax, eax
jne 0x41f7d3
push eax
lea edx, [ebp - 0xc]
push edx
push 8
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0x7405c
push edi
call ebx
test eax, eax
jne 0x41f7cb
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x158]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
test eax, eax
jne 0x41f7c3
push eax
lea edx, [ebp - 0xc]
push edx
push 0x20
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push 0x74004
push edi
call ebx
test eax, eax
jne 0x41f7bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x34]
push ecx
push esi
push str.reading_volumes_length
call fcn.0041e6b0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x18], 7
je 0x41f700
mov edi, dword [ebp - 4]
xor ecx, ecx
xor edx, edx
jmp 0x41f7f6
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
jmp 0x41f7f6
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x41f7f6
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
jmp 0x41f7f6
mov esi, dword [ebp - 0x25c]
xor ecx, ecx
xor edx, edx
test esi, esi
jbe 0x41f7f6
lea eax, [ebp - 0x244]
mov ebx, dword [eax]
add ecx, ebx
mov ebx, dword [eax + 4]
adc edx, ebx
add eax, 0x18
dec esi
jne 0x41f7e7
push 0
push 0x100000
push edx
push ecx
call fcn.00422480
mov edx, dword [ebp + 0x30]
push edi
mov dword [edx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp + 0x24]
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x1c]
xor eax, eax
cmp ecx, 7
mov ecx, dword [ebp + 0x14]
sete al
push esi
push edi
push ebx
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x10]
mov dword [edx], eax
mov edx, dword [ebp - 0x10]
mov dword [ecx], edx
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x2c]
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 0x28]
push ecx
push edx
push eax
lea ecx, [ebp - 0x158]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x41f899
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
push esi
jne 0x41f870
push str._Inaccessible_
jmp 0x41f875
push str._Unknown_
push edi
call fcn.0041fd70
mov edx, dword [ebp + 0x2c]
mov eax, dword [ebp + 0x28]
add esp, 0xc
push edx
push str._None_
push eax
call fcn.0041fd70
add esp, 0xc
mov dword [ebx], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret