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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3fc
push edi
push esi
push ebx
mov edx, dword [ebp + 8]
mov al, byte [edx]
cmp al, 0x2a
je 0x42c0d5
cmp al, 0x2f
je 0x42c0d5
add esp, 0xfffffff8
lea ebx, [ebp - 0x100]
push edx
push ebx
call sub.cygwin1.dll_strcpy
add esp, 0xfffffff8
push 0x2f
push ebx
call sub.cygwin1.dll_strrchr
mov edi, eax
add esp, 0x20
test edi, edi
je 0x42bebc
add esp, 0xfffffffc
mov byte [edi], 0
push 0x78
lea esi, [ebp - 0x1e0]
push ebx
lea ebx, [ebp - 0x180]
push ebx
call sub.cygwin1.dll_strncpy
add esp, 0xfffffffc
mov byte [ebp - 0x108], 0
push 0x50
lea eax, [edi + 1]
push eax
push esi
call sub.cygwin1.dll_strncpy
mov byte [ebp - 0x190], 0
mov eax, ebx
mov byte [edi], 0x2f
add esp, 0x20
mov ebx, esi
jmp 0x42bee5
add esp, 0xfffffffc
mov byte [ebp - 0x180], 0
push 0x50
push ebx
lea ebx, [ebp - 0x1e0]
push ebx
call sub.cygwin1.dll_strncpy
mov byte [ebp - 0x190], 0
add esp, 0x10
lea eax, [ebp - 0x180]
add esp, 0xfffffff4
push eax
call fcn.0042b5c8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x42c0d5
add esp, 0xfffffffc
mov dword [ebp - 0x3e4], 0
lea eax, [ebp - 0x3e4]
push eax
push ebx
push esi
call fcn.00435138
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0x3e4]
test ebx, ebx
jne 0x42bff0
add esp, 0xfffffff4
lea ebx, [ebp - 0x3e0]
push esi
call sub.cygwin1.dll_rewind
push esi
push 1
push 0x200
push ebx
call sub.cygwin1.dll_fread
add esp, 0x20
test eax, eax
jg 0x42bf5d
mov byte [ebp - 0x3e0], 1
mov word [ebp - 0x3de], 1
add esp, 0xfffffff4
push 0
call sub.cygwin1.dll_time
mov dword [ebp - 0x3dc], eax
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_rewind
add esp, 0x20
push esi
push 1
push 0x200
push ebx
call sub.cygwin1.dll_fwrite
add esp, 0x10
add esp, 0xfffffffc
push 2
push 0
push esi
call sub.cygwin1.dll_fseek
dec dword [0x45cc24]
add esp, 0x10
mov word [ebp - 0x3e0], 3
mov dword [ebp - 0x3dc], 0
mov word [ebp - 0x3de], 0
mov dword [ebp - 0x3d8], 0
add esp, 0xfffffffc
push ebx
push 9
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_fileno
add esp, 0x10
push eax
call sub.cygwin1.dll_fcntl
add esp, 0x10
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_fclose
jmp 0x42c0d5
add esp, 0xfffffffc
inc word [ebx + 0x190]
push 0
push eax
push esi
call sub.cygwin1.dll_fseek
push esi
push 1
push 0x200
push ebx
call sub.cygwin1.dll_fwrite
lea ebx, [ebp - 0x3e0]
add esp, 0x20
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_rewind
push esi
push 1
push 0x200
push ebx
call sub.cygwin1.dll_fread
add esp, 0x20
test eax, eax
jg 0x42c048
mov byte [ebp - 0x3e0], 1
mov word [ebp - 0x3de], 1
add esp, 0xfffffff4
push 0
call sub.cygwin1.dll_time
mov dword [ebp - 0x3dc], eax
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_rewind
add esp, 0x20
push esi
push 1
push 0x200
push ebx
call sub.cygwin1.dll_fwrite
add esp, 0x10
add esp, 0xfffffffc
push 2
push 0
push esi
call sub.cygwin1.dll_fseek
dec dword [0x45cc24]
add esp, 0x10
mov word [ebp - 0x3e0], 3
mov dword [ebp - 0x3dc], 0
mov word [ebp - 0x3de], 0
mov dword [ebp - 0x3d8], 0
add esp, 0xfffffffc
push ebx
push 9
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_fileno
add esp, 0x10
push eax
call sub.cygwin1.dll_fcntl
add esp, 0x10
add esp, 0xfffffff4
push esi
call sub.cygwin1.dll_fclose
lea esp, [ebp - 0x408]
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret