Function at 0x40f500
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47cd11
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x498
mov eax, dword [0x4a8ae4]
push ebx
push esi
push edi
xor eax, ebp
xor edi, edi
mov dword [esp + 0x49c], eax
mov esi, ecx
xor bl, bl
mov dword [esp + 0x10], edi
call fcn.00476002
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
call fcn.004621d7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x4ac], edi
call fcn.004621d7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], edi
mov word [esp + 0x28], di
push 0x200
lea eax, [esp + 0x44]
push eax
push edi
mov byte [esp + 0x4b8], 2
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
sub eax, 2
je 0x40f719
dec eax
je 0x40f60f
sub eax, 2
jne 0x40f7ad
lea eax, [esp + 0x40]
mov ebx, 1
push eax
mov dword [esi + 0xa0], ebx
call fcn.00449da9
add esp, 4
push eax
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esi + 0xa4]
call fcn.00402410
mov dword [esp + 0x10], ebx
mov dword [esi + 0xdd4], ebx
mov dword [esi + 0xa0], ebx
jmp 0x40f7ad
movzx edx, word [esp + 0x40]
xor eax, eax
push edx
mov ecx, 0x96
lea edi, [esp + 0x244]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x244]
push str.__c:
push eax
call fcn.0044ac37
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push 0
lea ecx, [esp + 0x258]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x40f7ab
push 0x227
call fcn.004620d8
mov edx, dword [esp + 0x20]
add esp, 4
mov edi, eax
push edi
push edx
mov ecx, esi
mov dword [edi + 4], 0x227
call fcn.0040dc50
test eax, eax
je 0x40f6a9
mov eax, dword [edi + 0x1c]
cmp eax, 7
je 0x40f6a7
cmp eax, 4
jne 0x40f6a9
mov eax, 1
mov dword [esi + 0xa0], eax
mov dword [esp + 0x10], eax
mov bl, 1
push edi
call fcn.004620d3
mov eax, dword [esp + 0x20]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x40f701
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esi + 0xa4]
call fcn.00402830
mov eax, dword [esp + 0x10]
inc eax
mov dword [esi + 0xa0], 1
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40f7ab
xor edi, edi
mov dword [esi + 0xa0], 1
jmp 0x40f7ad
push 0x13d
mov ecx, esi
call fcn.0040e720
mov dword [esi + 0xa0], 0
jmp 0x40f6e4
cmp dword [esp + 0x3c], 8
jb 0x40f72c
mov ebx, dword [esp + 0x28]
cmp ebx, edi
jne 0x40f730
xor eax, eax
jmp 0x40f739
lea ebx, [esp + 0x28]
push ebx
call fcn.00449da9
add esp, 4
push eax
push ebx
lea ecx, [esp + 0x20]
call fcn.00403be0
push 0x48a6a0
call fcn.00449da9
add esp, 4
push eax
push 0x48a6a0
lea ecx, [esp + 0x1c]
call fcn.00403be0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.0044a53d
add esp, 8
test eax, eax
je 0x40f7ad
lea ecx, [esp + 0x40]
mov ebx, 1
push ecx
mov dword [esi + 0xa0], ebx
call fcn.00449da9
add esp, 4
push eax
lea edx, [esp + 0x44]
push edx
lea ecx, [esi + 0xa4]
call fcn.00402410
mov dword [esp + 0x10], ebx
mov dword [esi + 0xa0], ebx
jmp 0x40f7ad
xor edi, edi
mov eax, dword [esp + 0x10]
cmp eax, 1
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0xda8], eax
jbe 0x40f7cc
push 0xf3
mov ecx, esi
call fcn.0040e720
cmp dword [esp + 0x3c], 8
mov esi, dword [esi + 0xa0]
jb 0x40f7e6
mov edx, dword [esp + 0x28]
push edx
call fcn.004620d3
add esp, 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], edi
mov word [esp + 0x28], di
mov byte [esp + 0x4ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f81d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x4ac], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f846
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x4a4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x49c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044a318
mov esp, ebp
pop ebp
ret