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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor eax, eax
mov rsi, rcx
mov ebx, edx
mov rbp, r8
mov dl, byte [rsi + rax + 6]
lea r12, [rsp + 0x2d]
mov byte [rsp + rax + 0x2d], dl
inc rax
cmp rax, 0x32
jne 0x14000175a
lea rcx, str.PPF2.0_patch_information:_n
mov byte [rsp + 0x5f], 0
call sym.printf_char_const__::_
mov rdx, r12
lea rcx, str.Description_:__s_n
call sym.printf_char_const__::_
lea rcx, str.File_id.diz_:
call sym.printf_char_const__::_
mov r8d, 2
mov edx, ebx
mov rcx, rsi
call sym.ShowFileId_unsigned_char_const__unsigned_int__int_
mov r12d, eax
test eax, eax
jne 0x1400017bf
lea rcx, str.not_available_n
call sym.printf_char_const__::_
movzx eax, byte [rsi + 0x39]
movzx edx, byte [rsi + 0x38]
mov r8d, 2
mov rcx, rbp
movzx edi, byte [rsi + 0x3a]
shl eax, 8
add edx, eax
shl edi, 0x10
lea eax, [rdx + rdi]
movzx edi, byte [rsi + 0x3b]
xor edx, edx
shl edi, 0x18
add edi, eax
call dbg.fseeko64
mov rcx, rbp
call sym.ftell
cmp edi, eax
mov rdi, qword [dbg.__acrt_iob_func]
je 0x14000183c
lea rcx, str.The_size_of_the_bin_file_isnt_correct__continue____y_n_:
call sym.printf_char_const__::_
mov ecx, 1
call rdi
mov rcx, rax
call sym.fflush
xor ecx, ecx
call rdi
mov rcx, rax
call sym.getc
and eax, 0xffffffdf
cmp al, 0x59
je 0x14000183c
lea rcx, str.Aborted..._n
jmp 0x1400019cf
xor ecx, ecx
call rdi
mov rcx, rax
call sym.fflush
xor eax, eax
lea rdx, [0x1400ffa60]
mov cl, byte [rsi + rax + 0x3c]
mov byte [rdx + rax], cl
inc rax
cmp rax, 0x400
jne 0x140001851
xor r8d, r8d
mov edx, 0x9320
mov rcx, rbp
call dbg.fseeko64
lea rcx, [0x1400ffe60]
mov r9, rbp
mov r8d, 0x400
mov edx, 1
call sym.fread
lea rcx, str.Error:_Can_not_read_bin_block_n
cmp rax, 0x400
jne 0x1400019cf
mov r8d, 0x400
lea rdx, [0x1400ffe60]
lea rcx, [0x1400ffa60]
call sym.memcmp
test al, al
je 0x1400018ef
lea rcx, str.Binblock_Patchvalidation_failed._continue____y_n_:
call sym.printf_char_const__::_
mov ecx, 1
call rdi
mov rcx, rax
call sym.fflush
xor ecx, ecx
call rdi
mov rcx, rax
call sym.getc
and eax, 0xffffffdf
cmp al, 0x59
jne 0x140001830
lea rcx, str.Patching...
call sym.printf_char_const__::_
mov ecx, 1
call rdi
mov rcx, rax
call sym.fflush
test r12d, r12d
jne 0x140001917
sub ebx, 0x43c
jmp 0x140001920
sub ebx, 0x462
sub ebx, r12d
mov r12d, 0x43c
lea r13, [0x1400ff860]
lea rcx, str.reading..._b_b_b_b_b_b_b_b_b_b
call sym.printf_char_const__::_
mov ecx, 1
call rdi
mov rcx, rax
call sym.fflush
mov eax, r12d
lea r8d, [r12 + 5]
movsxd rdx, dword [rsi + rax]
lea eax, [r12 + 4]
movzx r15d, byte [rsi + rax]
xor eax, eax
mov r14d, r15d
cmp r15d, eax
jle 0x140001979
lea ecx, [r8 + rax]
mov cl, byte [rsi + rcx]
mov byte [r13 + rax], cl
inc rax
jmp 0x140001963
xor r8d, r8d
mov rcx, rbp
lea r12d, [r12 + r15 + 5]
call dbg.fseeko64
lea rcx, str.writing..._b_b_b_b_b_b_b_b_b_b
call sym.printf_char_const__::_
mov ecx, 1
call rdi
mov rcx, rax
call sym.fflush
mov r9, rbp
movzx r8d, r14b
mov rcx, r13
mov edx, 1
call sym.fwrite
mov eax, 0xfffffffb
sub eax, r15d
add ebx, eax
jne 0x14000192d
lea rcx, str.successful._n
call sym.printf_char_const__::_
nop
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret