Function at 0x421794
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 0x4219cd
test eax, eax
js 0x4219cd
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__get_osfhandle
mov edi, eax
cmp eax, 0xffffffff
je 0x421820
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
dec eax
push esi
jne 0x421820
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 0x4217fe
inc eax
je 0x4219cd
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 0x421834
mov dword [esp], 9
call fcn.004251bc
or eax, 0xffffffff
jmp 0x421a06
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
sbb eax, dword [ebp - 0x6c]
jae 0x421971
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 0x4219cd
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 0x421820
test eax, eax
je 0x421820
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 0x42190a
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 0x4218ab
xor esi, esi
jmp 0x42190c
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 0x421925
mov dword [esp], ebx
call fcn.004258bc
mov eax, dword [ebp - 0x74]
xor ebx, ebx
mov dword [esp], eax
call fcn.004258bc
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.004258bc
test ebx, ebx
je 0x4219b3
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 0x4219b3
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 0x4219bf
cmp dword [ebp - 0x50], 0xffffffff
je 0x4219bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x4219cd
mov dword [esp], 0x1b
jmp 0x421827
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edx
test eax, eax
jne 0x4219d9
mov dword [esp], 0x16
jmp 0x421827
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.00425814
inc edx
jne 0x421a04
inc eax
je 0x4219cd
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret