Function at 0x401777
Capabilities:
Get disk size
Read file on windows

Disassembly:
push 0x40304c
push 0x40304c
push 0x403050
push 0x40304c
push 0
call sub.kernel32.dll_GetDiskFreeSpaceA
or eax, eax
je 0x4017dc
cmp dword [0x403050], 0x200
je 0x401836
push str.Bytes_per_sector_not_512
call fcn.00401b58
push 0x40326d
call fcn.00401b58
push 0x403270
call fcn.00401b58
call fcn.00401b90
push 0x403289
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
jmp 0x401836
pushal
pushfd
call sub.kernel32.dll_GetLastError
mov edi, eax
push 0
push 0x400
push 0x4033b0
push 0
push edi
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
popfd
popal
push 0x4033b0
call fcn.00401b58
push 0x40328c
call fcn.00401b58
push 0x40328f
call fcn.00401b58
call fcn.00401b90
push 0x4032a8
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push str..PHYSICALDRIVE0
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x4018b0
pushal
pushfd
call sub.kernel32.dll_GetLastError
mov edi, eax
push 0
push 0x400
push 0x4033b0
push 0
push edi
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
popfd
popal
push 0x4033b0
call fcn.00401b58
push 0x4032be
call fcn.00401b58
push 0x4032c1
call fcn.00401b58
call fcn.00401b90
push 0x4032da
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
jmp 0x4018b5
mov dword [0x403048], eax
push 0
push 0x40304c
push 0x200
push 0x403054
push dword [0x403048]
call sub.kernel32.dll_ReadFile
or eax, eax
jne 0x40192f
pushal
pushfd
call sub.kernel32.dll_GetLastError
mov edi, eax
push 0
push 0x400
push 0x4033b0
push 0
push edi
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
popfd
popal
push 0x4033b0
call fcn.00401b58
push 0x4032dd
call fcn.00401b58
push 0x4032e0
call fcn.00401b58
call fcn.00401b90
push 0x4032f9
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
push 0x4032fc
call fcn.00401b58
push 0xa
push 0x403302
push dword [0x40304c]
call dword [sym.imp.msvcrt.dll__ultoa]
add esp, 0xc
push 0x403302
call fcn.00401b58
push 0x403318
call fcn.00401b58
push 1
push 0x20
push 0x403054
call fcn.00401000
push 0x403323
call fcn.00401b58
movzx eax, byte [0x403212]
cmp eax, 0x80
jne 0x401aca
mov eax, dword [0x40321a]
shl eax, 9
push 0
push 0
push eax
push dword [0x403048]
call sub.kernel32.dll_SetFilePointer
cmp eax, 0xffffffff
jne 0x401a04
pushal
pushfd
call sub.kernel32.dll_GetLastError
mov edi, eax
push 0
push 0x400
push 0x4033b0
push 0
push edi
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
popfd
popal
push 0x4033b0
call fcn.00401b58
push 0x403326
call fcn.00401b58
push 0x403329
call fcn.00401b58
call fcn.00401b90
push 0x403342
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
push 0
push 0x40304c
push 0x200
push 0x403054
push dword [0x403048]
call sub.kernel32.dll_ReadFile
or eax, eax
jne 0x401a7e
pushal
pushfd
call sub.kernel32.dll_GetLastError
mov edi, eax
push 0
push 0x400
push 0x4033b0
push 0
push edi
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
popfd
popal
push 0x4033b0
call fcn.00401b58
push 0x403345
call fcn.00401b58
push 0x403348
call fcn.00401b58
call fcn.00401b90
push 0x403361
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
push str.Read
call fcn.00401b58
push 0xa
push 0x40336a
push dword [0x40304c]
call dword [sym.imp.msvcrt.dll__ultoa]
add esp, 0xc
push 0x40336a
call fcn.00401b58
push str._bytes_r_n_r_n
call fcn.00401b58
push 1
push 0x20
push 0x403054
call fcn.00401000
push 0x40338b
call fcn.00401b58
push dword [0x403048]
call sub.kernel32.dll_CloseHandle
push str.Press_any_key_to_exit...
call fcn.00401b58
call fcn.00401b90
push 0x4033a7
call fcn.00401b58
push 0
call sub.kernel32.dll_ExitProcess
int3