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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov eax, dword [esp + 0xb4]
cmp dword [esp + 0xb0], 0xffffffff
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x34], eax
je 0x4115d0
test eax, eax
js 0x4115d0
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__get_osfhandle
mov edi, eax
cmp eax, 0xffffffff
je 0x411608
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
sub esp, 4
cmp eax, 1
jne 0x411608
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__telli64
mov ecx, eax
mov dword [esp + 0x38], eax
mov eax, edx
not ecx
not eax
mov dword [esp + 0x3c], edx
or eax, ecx
je 0x4115d0
mov eax, dword [esp + 0x30]
mov dword [esp], edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x50]
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
sub esp, 8
test eax, eax
je 0x411608
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0x50], ecx
sbb eax, ebx
jb 0x411468
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0xc], 0
mov dword [esp], edi
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x5c]
mov dword [esp + 0x58], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x411410
cmp dword [esp + 0x58], 0xffffffff
jne 0x4115e6
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
sub esp, 4
test eax, eax
je 0x4115d0
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__lseeki64
not eax
not edx
or edx, eax
je 0x4115d0
xor eax, eax
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x58]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
sub esp, 8
test eax, eax
je 0x4115d0
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
mov ebp, eax
test ebx, ebx
je 0x411608
test eax, eax
je 0x411608
mov dword [esp + 4], 0x32
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
sub esp, 8
mov esi, eax
jmp 0x411500
mov dword [esp + 8], 0x32
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
sub esp, 0xc
test eax, eax
je 0x4115b8
lea eax, [esp + 0x44]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x105
mov dword [esp + 4], ebp
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
sub esp, 0x20
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x74], eax
jne 0x4114e0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
sub esp, 4
mov dword [esp], ebp
call sub.msvcrt.dll_free
lea eax, [esp + 0x48]
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 esi, eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
test esi, esi
je 0x4115f3
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
sub eax, dword [esp + 0x50]
sbb edx, dword [esp + 0x54]
cmp dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
sbb eax, edx
jae 0x4113d0
jmp 0x4115f3
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
sub esp, 4
mov dword [esp], ebx
xor ebx, ebx
call sub.msvcrt.dll_free
jmp 0x411556
mov dword [esp], 0x16
call fcn.00419df0
mov eax, 0xffffffff
jmp 0x411459
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x4115d0
mov dword [esp], 0x1b
call fcn.00419df0
jmp 0x4115dc
mov dword [esp], 9
call fcn.00419df0
jmp 0x4115dc