Function at 0x611fc8
Capabilities:
Get disk size
Get file size
Get volume information via ioctl
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffed4
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 4], eax
mov eax, esi
call fcn.00406b30
push 0
push 0
push 3
push 0
push 7
push 0
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x612420
mov eax, dword [ebp - 4]
push eax
push 0x612428
lea eax, [ebp - 0x128]
push eax
call sub.user32.dll_wvsprintfW
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x128]
push eax
call sub.kernel32.dll_GetDiskFreeSpaceW
mov ebx, dword [ebp - 0x48]
imul ebx, dword [ebp - 0x4c]
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x70], eax
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
call fcn.004092c8
mov edi, eax
shl edi, 4
add edi, 0x20
mov eax, edi
call fcn.00404368
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov edx, edi
call fcn.00404f1c
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
push 0
lea eax, [ebp - 0x38]
push eax
push edi
mov eax, dword [ebp - 0x2c]
push eax
push 8
lea eax, [ebp - 0x28]
push eax
push 0x90073
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x6122b3
mov eax, dword [ebp - 4]
push eax
push 0x612430
lea eax, [ebp - 0x128]
push eax
call sub.user32.dll_wvsprintfW
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x128]
push eax
call sub.kernel32.dll_CreateFileW_1
mov edi, eax
cmp edi, 0xffffffff
je 0x612417
mov eax, ebx
call fcn.00404368
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov edx, ebx
call fcn.00404f1c
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 8]
mov dword [ebp - 0x68], edx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
dec eax
test eax, eax
jb 0x612294
inc eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x34]
add eax, eax
mov edx, dword [ebp - 0x2c]
lea eax, [edx + eax*8 + 0x10]
mov edx, dword [eax + 4]
mov eax, dword [eax]
sub eax, dword [ebp - 0x68]
sbb edx, dword [ebp - 0x64]
mov dword [ebp - 0x30], eax
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x34]
add eax, eax
mov edx, dword [ebp - 0x2c]
lea eax, [edx + eax*8 + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [eax]
call fcn.00409280
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x68]
mov edx, dword [ebp - 0x64]
call fcn.00409280
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x30]
dec eax
test eax, eax
jb 0x612272
inc eax
mov dword [ebp - 0x80], eax
push 0
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x60]
push eax
push edi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x3c]
push eax
push ebx
mov eax, dword [ebp - 0x18]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x3c], 0
jbe 0x612249
mov eax, dword [esi]
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
test ecx, ecx
je 0x6121cc
sub ecx, 4
mov ecx, dword [ecx]
mov eax, ecx
cdq
push edx
push eax
mov eax, dword [ebp - 0x3c]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, eax
mov eax, esi
xor ecx, ecx
call fcn.00407584
mov eax, dword [esi]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x84], eax
cmp dword [ebp - 0x84], 0
je 0x612219
mov eax, dword [ebp - 0x84]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x84], eax
mov eax, esi
call fcn.00407318
push eax
mov eax, dword [ebp - 0x84]
inc eax
cdq
push edx
push eax
mov eax, dword [ebp - 0x3c]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
pop edx
lea edx, [edx + eax - 1]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x3c]
call fcn.0040452c
mov eax, ebx
xor edx, edx
add eax, dword [ebp - 0x60]
adc edx, dword [ebp - 0x5c]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
mov eax, ebx
xor edx, edx
add eax, dword [ebp - 0x58]
adc edx, dword [ebp - 0x54]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
dec dword [ebp - 0x80]
jne 0x61218a
mov eax, dword [ebp - 0x34]
add eax, eax
mov edx, dword [ebp - 0x2c]
mov ecx, dword [edx + eax*8 + 0x10]
mov dword [ebp - 0x68], ecx
mov ecx, dword [edx + eax*8 + 0x14]
mov dword [ebp - 0x64], ecx
inc dword [ebp - 0x34]
dec dword [ebp - 0x7c]
jne 0x612127
mov eax, dword [ebp - 0x18]
call fcn.00404384
mov eax, esi
xor ecx, ecx
mov edx, dword [ebp - 0x70]
call fcn.00407584
push edi
call sub.kernel32.dll_CloseHandle_1
jmp 0x612417
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x26
jne 0x612417
mov eax, dword [ebp - 4]
push eax
push 0x612430
lea eax, [ebp - 0x128]
push eax
call sub.user32.dll_wvsprintfW
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x128]
push eax
call sub.kernel32.dll_CreateFileW_1
mov edi, eax
cmp edi, 0xffffffff
je 0x612417
push 0
lea eax, [ebp - 0x38]
push eax
push 0x60
lea eax, [ebp - 0x118]
push eax
push 0
push 0
push 0x90064
push edi
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x612409
lea eax, [ebp - 0xb8]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetFileInformationByHandle
test eax, eax
je 0x612409
mov eax, dword [ebp - 0xe8]
add eax, 0x10
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x40]
call fcn.00404368
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
xor ecx, ecx
mov edx, dword [ebp - 0x40]
call fcn.00404f1c
push 0
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 8]
push eax
push 8
lea eax, [ebp - 0x10]
push eax
push 0x90068
push edi
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x612401
mov eax, dword [ebp - 8]
lea edx, [eax + 0xc]
movzx eax, word [edx + 0x14]
add eax, edx
xor ecx, ecx
mov dword [ebp - 0x14], ecx
xor ecx, ecx
mov dword [ebp - 0x44], ecx
jmp 0x6123cc
cmp word [eax], 0x80
jne 0x6123c5
mov ecx, eax
movzx eax, word [ecx + 0x14]
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x44], eax
jmp 0x6123d5
mov ecx, dword [eax + 4]
add ecx, eax
mov eax, ecx
mov ecx, dword [edx + 0x18]
add ecx, edx
cmp ecx, eax
ja 0x6123ab
cmp dword [ebp - 0x14], 0
je 0x612401
cmp dword [ebp - 0x44], 0
jbe 0x612401
mov eax, esi
xor ecx, ecx
mov edx, dword [ebp - 0x44]
call fcn.00407584
mov eax, esi
call fcn.00407318
mov edx, eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x44]
call fcn.0040452c
mov eax, dword [ebp - 8]
call fcn.00404384
mov eax, dword [ebp - 0x2c]
call fcn.00404384
push edi
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle_1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret