Function at 0x442a20
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 esi, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
test esi, esi
js 0x442cb1
cmp dword [esp + 0xb0], 0xffffffff
je 0x442cb1
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__get_osfhandle
cmp eax, 0xffffffff
mov edi, eax
je 0x442d50
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
sub esp, 4
cmp eax, 1
jne 0x442d50
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__telli64
mov ecx, eax
mov dword [esp + 0x28], eax
mov eax, edx
and eax, ecx
mov dword [esp + 0x2c], edx
cmp eax, 0xffffffff
je 0x442cb1
lea eax, [esp + 0x50]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], esi
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
sub esp, 8
test eax, eax
je 0x442d50
mov edx, dword [esp + 0x24]
cmp edx, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
jb 0x442c70
ja 0x442ae5
cmp eax, dword [esp + 0x50]
jbe 0x442c70
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 0x442cb1
mov dword [esp + 4], 2
mov dword [esp], 0x33
call sub.msvcrt.dll_calloc
mov dword [esp + 4], 2
mov ebx, eax
mov dword [esp], 0x106
call sub.msvcrt.dll_calloc
test ebx, ebx
mov dword [esp + 0x30], eax
je 0x442d50
test eax, eax
je 0x442d50
mov dword [esp + 4], 0x32
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
sub esp, 8
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], esi
mov edi, eax
mov dword [esp + 0x34], eax
mov esi, dword [esp + 0x30]
jmp 0x442b90
mov dword [esp + 8], 0x32
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
sub esp, 0xc
test eax, eax
je 0x442d20
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], esi
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 0x442b70
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
sub esp, 4
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_free
lea eax, [esp + 0x48]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
sub esp, 0x10
mov dword [esp], ebx
mov dword [esp + 0x30], eax
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x30]
test eax, eax
je 0x442c4c
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x50]
mov edx, dword [esp + 0x24]
sbb edx, dword [esp + 0x54]
cmp edx, dword [esp + 0x4c]
jbe 0x442c62
mov dword [esp], 0x1b
call fcn.00441870
mov eax, 0xffffffff
jmp 0x442d10
jb 0x442c70
cmp eax, dword [esp + 0x48]
ja 0x442c4c
lea esi, [esi]
lea eax, [esp + 0x5c]
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], esi
mov dword [esp + 0xc], 0
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x442cd0
cmp dword [esp + 0x58], 0xffffffff
je 0x442cd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
je 0x442c4c
mov dword [esp], 0x16
call fcn.00441870
add esp, 0x9c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
sub esp, 4
test eax, eax
je 0x442cb1
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll__lseeki64
and eax, edx
cmp eax, 0xffffffff
je 0x442cb1
xor eax, eax
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov esi, 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
jmp 0x442bf2
mov dword [esp], 9
call fcn.00441870
mov eax, 0xffffffff
jmp 0x442d10