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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1040
call fcn.00403b90
mov eax, dword [0x4167b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cdq
mov dword [ebp - 0x100c], eax
mov dword [ebp - 0x1008], edx
cmp dword [ebp + 0x1c], 0
jl 0x401b89
jg 0x4018f0
cmp dword [ebp + 0x18], 0
jbe 0x401b89
mov ecx, dword [ebp - 0x1008]
push ecx
mov edx, dword [ebp - 0x100c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004039e0
mov ecx, dword [ebp - 0x1008]
push ecx
mov ecx, dword [ebp - 0x100c]
push ecx
push edx
push eax
call fcn.00403a90
mov dword [ebp - 0x1014], eax
mov dword [ebp - 0x1010], edx
mov edx, dword [ebp - 0x1014]
add edx, dword [ebp - 0x100c]
mov eax, dword [ebp - 0x1010]
adc eax, dword [ebp - 0x1008]
sub edx, dword [ebp + 0xc]
sbb eax, dword [ebp + 0x10]
mov dword [ebp - 0x1040], edx
mov dword [ebp - 0x103c], eax
mov ecx, dword [ebp + 0x1c]
cmp ecx, dword [ebp - 0x103c]
jg 0x401982
jl 0x40196e
mov edx, dword [ebp + 0x18]
cmp edx, dword [ebp - 0x1040]
jae 0x401982
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1028], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x1024], ecx
jmp 0x4019ac
mov edx, dword [ebp - 0x1014]
add edx, dword [ebp - 0x100c]
mov eax, dword [ebp - 0x1010]
adc eax, dword [ebp - 0x1008]
sub edx, dword [ebp + 0xc]
sbb eax, dword [ebp + 0x10]
mov dword [ebp - 0x1028], edx
mov dword [ebp - 0x1024], eax
mov ecx, dword [ebp - 0x1028]
mov dword [ebp - 0x101c], ecx
mov edx, dword [ebp - 0x1024]
mov dword [ebp - 0x1018], edx
mov eax, dword [ebp - 0x1018]
cmp eax, dword [ebp - 0x1008]
jg 0x401a81
jl 0x4019ea
mov ecx, dword [ebp - 0x101c]
cmp ecx, dword [ebp - 0x100c]
jae 0x401a81
mov edx, dword [ebp - 0x1010]
push edx
mov eax, dword [ebp - 0x1014]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call fcn.00401170
add esp, 0xc
test eax, eax
jne 0x401a14
mov eax, str.bad_seek_prior_to_read
jmp 0x401b8b
push 0
lea eax, [ebp - 0x1020]
push eax
mov ecx, dword [ebp - 0x100c]
push ecx
lea edx, [ebp - 0x1004]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401a45
mov eax, str.error_reading
jmp 0x401b8b
mov edx, dword [ebp - 0x1020]
xor eax, eax
mov dword [ebp - 0x1038], edx
mov dword [ebp - 0x1034], eax
mov ecx, dword [ebp - 0x1034]
cmp ecx, dword [ebp - 0x1008]
jg 0x401a81
jl 0x401a77
mov edx, dword [ebp - 0x1038]
cmp edx, dword [ebp - 0x100c]
jae 0x401a81
mov eax, str.error_reading_full_sector
jmp 0x401b8b
mov eax, dword [ebp - 0x101c]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x1008]
push edx
mov eax, dword [ebp - 0x100c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00403ad0
lea eax, [ebp + eax - 0x1004]
push eax
call fcn.00403280
add esp, 0xc
mov ecx, dword [ebp - 0x1010]
push ecx
mov edx, dword [ebp - 0x1014]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call fcn.00401170
add esp, 0xc
test eax, eax
jne 0x401ae1
mov eax, str.bad_seek_prior_to_writed
jmp 0x401b8b
push 0
lea edx, [ebp - 0x1020]
push edx
mov eax, dword [ebp - 0x100c]
push eax
lea ecx, [ebp - 0x1004]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b0f
mov eax, str.error_writing
jmp 0x401b8b
mov ecx, dword [ebp - 0x1020]
xor edx, edx
mov dword [ebp - 0x1030], ecx
mov dword [ebp - 0x102c], edx
mov eax, dword [ebp - 0x102c]
cmp eax, dword [ebp - 0x1008]
jg 0x401b48
jl 0x401b41
mov ecx, dword [ebp - 0x1030]
cmp ecx, dword [ebp - 0x100c]
jae 0x401b48
mov eax, str.error_writing_full_sector
jmp 0x401b8b
mov edx, dword [ebp - 0x101c]
add edx, dword [ebp + 0x14]
mov dword [ebp + 0x14], edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x101c]
mov ecx, dword [ebp + 0x10]
adc ecx, dword [ebp - 0x1018]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 0x18]
sub edx, dword [ebp - 0x101c]
mov eax, dword [ebp + 0x1c]
sbb eax, dword [ebp - 0x1018]
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x1c], eax
jmp 0x4018da
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004039c9
mov esp, ebp
pop ebp
ret