Function at 0x40bda0
Capabilities:
Get common file path
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421da8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x42c008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
call fcn.0040b020
mov edi, eax
test edi, edi
je 0x40c12c
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 2
call fcn.0040b020
mov edi, eax
test edi, edi
je 0x40c136
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
lea edi, [eax + 0x10]
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 4
call fcn.0040b020
mov ebx, eax
test ebx, ebx
je 0x40c140
mov eax, dword [ebx]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222ec]
mov ecx, ebx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x24]
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
mov edx, 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x105
or edx, ecx
mov byte [ebp - 4], 5
jge 0x40be97
push 0x105
lea ecx, [ebp - 0x24]
call fcn.0040c1c0
mov eax, dword [ebp - 0x24]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x40beb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [ebp - 0x28], eax
jmp 0x40beb9
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov eax, dword [ebp - 0x24]
push dword [eax - 8]
push eax
call fcn.00414fde
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40c14a
mov eax, dword [ebp - 0x24]
cmp ecx, dword [eax - 8]
jg 0x40c14a
xor edx, edx
mov dword [eax - 0xc], ecx
mov word [eax + ecx*2], dx
test ebx, ebx
jne 0x40c09d
mov ecx, dword [edi - 8]
mov edx, 1
sub edx, dword [edi - 4]
sub ecx, 0x105
or edx, ecx
jge 0x40bf17
push 0x105
lea ecx, [ebp - 0x30]
call fcn.0040c1c0
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
push 0x104
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
jne 0x40bf33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [ebp - 0x28], ebx
push dword [edi - 8]
push edi
call fcn.00414fde
add esp, 8
test eax, eax
js 0x40c14a
cmp eax, dword [edi - 8]
jg 0x40c14a
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
test ebx, ebx
jne 0x40c09d
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or ecx, eax
jge 0x40bf85
push 0x105
lea ecx, [ebp - 0x2c]
call fcn.0040c1c0
mov esi, dword [ebp - 0x2c]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
jne 0x40bfa1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [ebp - 0x28], ebx
push dword [esi - 8]
push esi
call fcn.00414fde
add esp, 8
test eax, eax
js 0x40c14a
cmp eax, dword [esi - 8]
jg 0x40c14a
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
jne 0x40c09d
movzx eax, word [esi]
mov ecx, esi
test ax, ax
je 0x40c03e
mov edx, eax
nop dword [eax + eax]
cmp dx, 0x5c
jne 0x40bff1
test ebx, ebx
mov eax, ecx
cmovne eax, ebx
mov ebx, eax
jmp 0x40bff3
xor ebx, ebx
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x40bfe0
test ebx, ebx
je 0x40c03e
sub ebx, esi
sar ebx, 1
js 0x40c14a
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or ecx, eax
jge 0x40c02c
push ebx
lea ecx, [ebp - 0x2c]
call fcn.0040c1c0
mov esi, dword [ebp - 0x2c]
cmp ebx, dword [esi - 8]
jg 0x40c14a
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
push 0
push 0
push 3
push 0
push 3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c063
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
jmp 0x40c09d
push 0
lea eax, [ebp - 0x14]
push eax
push 0xc
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0x2d1080
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40c08e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
jmp 0x40c096
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40c0c6
mov ebx, dword [esi]
push esi
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222ec]
mov ecx, ebx
call esi
or ebx, 0xffffffff
lea ecx, [edi - 0x10]
mov eax, ebx
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40c0e9
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40c10d
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222ec]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041043e
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00409640
push 0x80004005
call fcn.00409640
push 0x80004005
call fcn.00409640
push 0x80070057
call fcn.00409640
int3