Function at 0x40ca12
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x268
mov eax, dword [0x4127d8]
push esi
mov esi, dword [ebp + 0x78]
push 0x410898
push esi
mov dword [ebp + 0x6c], eax
call fcn.0040d3f9
test eax, eax
pop ecx
pop ecx
je 0x40ca53
call fcn.0040551d
push 2
pop esi
mov dword [eax], esi
call fcn.00405526
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x40cd4b
push ebx
xor ebx, ebx
cmp byte [esi + 1], 0x3a
jne 0x40ca8f
mov al, byte [esi]
cmp al, bl
je 0x40ca80
cmp byte [esi + 2], bl
jne 0x40ca80
call fcn.0040551d
push 2
pop esi
mov dword [eax], esi
call fcn.00405526
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x40cd4a
movsx eax, al
push eax
call fcn.0040d2f8
pop ecx
sub eax, 0x60
jmp 0x40ca94
call fcn.0040d213
mov dword [ebp - 0x1f8], eax
push edi
lea eax, [ebp - 0xd4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
or edi, 0xffffffff
cmp eax, edi
mov dword [ebp - 0x1ec], eax
jne 0x40cb5f
push 0x410894
push esi
call fcn.0040d3f9
test eax, eax
pop ecx
pop ecx
je 0x40cb49
push 0x104
lea eax, [ebp - 0x1d8]
push esi
push eax
call fcn.0040d169
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x40cb49
push esi
call fcn.00405100
cmp eax, 3
pop ecx
je 0x40cafb
call fcn.0040c9a5
test eax, eax
je 0x40cb49
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
jbe 0x40cb49
push edi
push ebx
push ebx
push ebx
push 1
push 1
push 0x7bc
mov dword [ebp - 0xd4], 0x10
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xb4], ebx
mov byte [ebp - 0xa8], bl
call fcn.0040d05b
mov esi, dword [ebp + 0x7c]
add esp, 0x1c
mov dword [esi + 0x1c], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x20], eax
jmp 0x40ccef
call fcn.0040551d
push 2
pop esi
mov dword [eax], esi
call fcn.00405526
mov dword [eax], esi
jmp 0x40cd47
lea eax, [ebp - 0x1f4]
push eax
lea eax, [ebp - 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x40cd2e
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1f4]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40cd2e
movzx eax, word [ebp - 0x1dc]
push edi
push eax
movzx eax, word [ebp - 0x1de]
push eax
movzx eax, word [ebp - 0x1e0]
push eax
movzx eax, word [ebp - 0x1e2]
push eax
movzx eax, word [ebp - 0x1e6]
push eax
movzx eax, word [ebp - 0x1e8]
push eax
call fcn.0040d05b
mov esi, dword [ebp + 0x7c]
add esp, 0x1c
cmp dword [ebp - 0xc8], ebx
mov dword [esi + 0x1c], eax
jne 0x40cbe6
cmp dword [ebp - 0xc4], ebx
je 0x40cc57
lea eax, [ebp - 0x1f4]
push eax
lea eax, [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x40cd2e
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1f4]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40cd2e
movzx eax, word [ebp - 0x1dc]
push edi
push eax
movzx eax, word [ebp - 0x1de]
push eax
movzx eax, word [ebp - 0x1e0]
push eax
movzx eax, word [ebp - 0x1e2]
push eax
movzx eax, word [ebp - 0x1e6]
push eax
movzx eax, word [ebp - 0x1e8]
push eax
call fcn.0040d05b
add esp, 0x1c
cmp dword [ebp - 0xd0], ebx
mov dword [esi + 0x18], eax
jne 0x40cc6f
cmp dword [ebp - 0xcc], ebx
jne 0x40cc6f
mov eax, dword [esi + 0x1c]
jmp 0x40cce0
lea eax, [ebp - 0x1f4]
push eax
lea eax, [ebp - 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x40cd2e
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1f4]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40cd2e
movzx eax, word [ebp - 0x1dc]
push edi
push eax
movzx eax, word [ebp - 0x1de]
push eax
movzx eax, word [ebp - 0x1e0]
push eax
movzx eax, word [ebp - 0x1e2]
push eax
movzx eax, word [ebp - 0x1e6]
push eax
movzx eax, word [ebp - 0x1e8]
push eax
call fcn.0040d05b
add esp, 0x1c
push dword [ebp - 0x1ec]
mov dword [esi + 0x20], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 0x78]
push dword [ebp - 0xd4]
call fcn.0040c8e8
mov word [esi + 6], ax
mov eax, dword [ebp - 0xb4]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x1f8]
dec eax
pop ecx
mov dword [esi], eax
mov dword [esi + 0x10], eax
pop ecx
mov word [esi + 8], 1
mov word [esi + 4], bx
mov word [esi + 0xc], bx
mov word [esi + 0xa], bx
xor eax, eax
jmp 0x40cd49
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040552f
pop ecx
push dword [ebp - 0x1ec]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp + 0x6c]
pop esi
call fcn.00408fbd
add ebp, 0x70
leave
ret