Function at 0x4014f6
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2bc
mov eax, dword [esp + 0x2d0]
lea ebx, [esp + 0x22c]
mov dword [esp], ebx
mov dword [esp + 4], str..PHYSICALDRIVE_d
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
mov ebx, eax
jne 0x401570
mov dword [esp], str.Accessing_physical_drive
jmp 0x401796
mov dword [esp], eax
call fcn.004013df
cmp eax, 0x200
je 0x4015ad
mov dword [esp], ebx
call fcn.004013df
mov dword [esp + 0xc], 0x200
mov dword [esp + 4], str.Error:_Sector_size_of_this_drive_is__d__must_be__d_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x4015eb
lea eax, [esp + 0x2ac]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
jne 0x4015ef
mov dword [esp], str.Reading_raw_drive
call fcn.0040147a
xor esi, esi
jmp 0x401629
mov eax, dword [esp + 0x2ac]
mov esi, 1
cmp eax, 0x200
je 0x401629
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor si, si
mov dword [esp + 0xc], 0x200
mov dword [esp + 4], str.Error:_ReadFile_on_drive_only_got__d_of__d_bytes_n
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cmp dword [esp + 0x2d8], 0
je 0x401673
test esi, esi
je 0x401673
mov ecx, dword [0x411284]
cmp ecx, 0x1bd
jbe 0x401661
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor esi, esi
mov dword [esp], str.Error:_MBR_will_not_fit__not_writing_n
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputs
jmp 0x401673
lea eax, [esp + 0x2c]
mov esi, 0x40901c
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov esi, 1
cmp dword [esp + 0x2dc], 0
je 0x4016db
mov eax, dword [esp + 0x2d4]
dec eax
mov edx, eax
shl edx, 4
cmp byte [esp + edx + 0x1ea], 0x80
je 0x4016db
cmp eax, 1
mov ebp, 0xffffff80
sbb edx, edx
mov edi, ebp
xor ecx, ecx
and edx, 0xffffff80
cmp eax, 1
cmovne edi, ecx
cmp eax, 2
mov byte [esp + 0x1ea], dl
mov edx, edi
mov edi, ebp
cmovne edi, ecx
cmp eax, 3
mov byte [esp + 0x1fa], dl
mov edx, edi
mov byte [esp + 0x20a], dl
mov edx, ebp
cmovne edx, ecx
mov byte [esp + 0x21a], dl
test esi, esi
je 0x401782
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.KERNEL32.dll_SetFilePointer
sub esp, 0x10
lea eax, [esp + 0x2ac]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
jne 0x401748
mov dword [esp], str.Writing_MBR
xor esi, esi
call fcn.0040147a
jmp 0x401782
mov eax, dword [esp + 0x2ac]
mov esi, 1
cmp eax, 0x200
je 0x401782
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor si, si
mov dword [esp + 0xc], 0x200
mov dword [esp + 4], str.Error:_WriteFile_on_drive_only_wrote__d_of__d_bytes_n
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
call sub.KERNEL32.dll_CloseHandle
test eax, eax
push ecx
jne 0x40179d
mov dword [esp], str.CloseFile_on_drive
call fcn.0040147a
xor esi, esi
add esp, 0x2bc
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret