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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x7c], eax
je 0x42196d
test eax, eax
js 0x42196d
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__get_osfhandle
mov edi, eax
cmp eax, 0xffffffff
je 0x4217c0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
dec eax
push esi
jne 0x4217c0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__telli64
mov dword [ebp - 0x88], edx
inc edx
mov dword [ebp - 0x84], eax
jne 0x42179e
inc eax
je 0x42196d
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push ebx
push ebx
test eax, eax
jne 0x4217d4
mov dword [esp], 9
call fcn.00424ea8
or eax, 0xffffffff
jmp 0x4219a6
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
sbb eax, dword [ebp - 0x6c]
jae 0x421911
lea eax, [ebp - 0x50]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
push ecx
push ecx
test eax, eax
je 0x42196d
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 dword [ebp - 0x74], eax
test ebx, ebx
je 0x4217c0
test eax, eax
je 0x4217c0
mov dword [esp + 4], 0x32
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
push edx
push edx
mov dword [ebp - 0x80], eax
xor eax, eax
mov dword [esp + 8], 0x105
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x64]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x74]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov eax, dword [ebp - 0x64]
sub esp, 0x20
cmp dword [ebp - 0x34], eax
je 0x4218aa
mov dword [esp + 8], 0x32
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
sub esp, 0xc
test eax, eax
jne 0x42184b
xor esi, esi
jmp 0x4218ac
mov esi, ebx
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
push eax
test esi, esi
jne 0x4218c5
mov dword [esp], ebx
call fcn.004254f4
mov eax, dword [ebp - 0x74]
xor ebx, ebx
mov dword [esp], eax
call fcn.004254f4
lea eax, [ebp - 0x60]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
sub esp, 0x10
mov ebx, eax
mov dword [esp], esi
call fcn.004254f4
test ebx, ebx
je 0x421953
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
sub eax, dword [ebp - 0x58]
sbb edx, dword [ebp - 0x54]
cmp dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
sbb eax, edx
jb 0x421953
mov eax, dword [ebp - 0x78]
xor ecx, ecx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
inc eax
jne 0x42195f
cmp dword [ebp - 0x50], 0xffffffff
je 0x42195f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x42196d
mov dword [esp], 0x1b
jmp 0x4217c7
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edx
test eax, eax
jne 0x421979
mov dword [esp], 0x16
jmp 0x4217c7
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x84]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0042545c
inc edx
jne 0x4219a4
inc eax
je 0x42196d
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret