Function at 0x410cd0
Capabilities:
Enumerate disk volumes
Get disk information
Get disk size
Get file size

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov edi, dword [esp + 0xc8]
mov eax, dword [esp + 0xc0]
mov ebp, dword [esp + 0xc4]
test edi, edi
js 0x410f6d
cmp eax, 0xffffffff
je 0x410f07
mov dword [esp], eax
call sub.msvcrt.dll__get_osfhandle
cmp eax, 0xffffffff
mov esi, eax
je 0x410fb0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
sub esp, 4
cmp eax, 1
jne 0x410fb0
lea eax, [esp + 0x90]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
sub esp, 8
test eax, eax
je 0x410fb0
cmp edi, dword [esp + 0x94]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], edi
jb 0x410f20
jbe 0x410f12
lea eax, [esp + 0x4c]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
sub esp, 8
test eax, eax
je 0x410f6d
mov dword [esp + 4], 2
mov dword [esp], 0x33
call sub.msvcrt.dll_calloc
mov dword [esp + 4], 2
mov dword [esp], 0x106
mov ebx, eax
call sub.msvcrt.dll_calloc
test eax, eax
mov dword [esp + 0x38], eax
je 0x410fb0
test ebx, ebx
je 0x410fb0
mov dword [esp + 4], 0x32
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
sub esp, 8
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x9c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x105
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
sub esp, 0x20
mov edx, dword [esp + 0x9c]
cmp dword [esp + 0x68], edx
je 0x410fe2
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 0x32
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
sub esp, 0xc
test eax, eax
jne 0x410dd4
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
sub esp, 4
mov dword [esp], ebx
xor ebx, ebx
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_free
lea eax, [esp + 0x88]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
sub esp, 0x10
mov ecx, eax
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov dword [esp + 0x2c], ecx
mov dword [esp], str.freespace__I64u_n
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_wprintf
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x410ef6
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
sub eax, dword [esp + 0x90]
sbb edx, dword [esp + 0x94]
cmp edx, dword [esp + 0x8c]
jb 0x410f20
jbe 0x410fd0
mov dword [esp], 0x1b
call fcn.00411010
mov eax, 0xffffffff
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ebp, dword [esp + 0x90]
ja 0x410d62
nop
lea eax, [esp + 0x84]
mov dword [esp + 0x80], ebp
mov dword [esp + 0x84], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x410f90
cmp dword [esp + 0x80], 0xffffffff
je 0x410f90
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
je 0x410ef6
mov dword [esp], 0x16
call fcn.00411010
add esp, 0xac
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edx, eax
sub esp, 4
xor eax, eax
test edx, edx
jne 0x410f07
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410f6d
mov dword [esp], 9
call fcn.00411010
add esp, 0xac
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, dword [esp + 0x88]
jbe 0x410f20
jmp 0x410ef6
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
sub esp, 4
jmp 0x410e66