Function at 0x1400019e6
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, 0x88
xor eax, eax
mov byte [rsp + 0x36], r9b
mov rsi, rcx
mov ebx, edx
mov rdi, r8
mov r12d, r9d
mov dl, byte [rsi + rax + 6]
lea r13, [rsp + 0x4d]
mov byte [rsp + rax + 0x4d], dl
inc rax
cmp rax, 0x32
jne 0x140001a0b
lea rcx, str.PPF3.0_patch_information:_n
mov byte [rsp + 0x7f], 0
call sym.printf_char_const__::_
mov rdx, r13
lea rcx, str.Description_:__s_n
call sym.printf_char_const__::_
lea rcx, str.File_id.diz_:
call sym.printf_char_const__::_
mov r8d, 3
mov edx, ebx
mov rcx, rsi
call sym.ShowFileId_unsigned_char_const__unsigned_int__int_
mov r13d, eax
test eax, eax
jne 0x140001a70
lea rcx, str.not_available_n
call sym.printf_char_const__::_
mov bpl, byte [rsi + 0x39]
mov r14b, byte [rsi + 0x3a]
cmp r12b, 2
jne 0x140001a8e
lea rcx, str.Error:_no_undo_data_available_n
test r14b, r14b
je 0x140001cb2
test bpl, bpl
mov r12, qword [dbg.__acrt_iob_func]
je 0x140001b69
xor ecx, ecx
mov r15b, byte [rsi + 0x38]
call r12
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 0x140001ab8
xor r8d, r8d
mov edx, 0x80a0
test r15b, r15b
jne 0x140001adc
mov edx, 0x9320
mov rcx, rdi
call dbg.fseeko64
lea rcx, [0x1400ffe60]
mov r9, rdi
mov r8d, 0x400
mov edx, 1
call sym.fread
lea rcx, str.Error:_Can_not_read_bin_block_n
cmp rax, 0x400
jne 0x140001cb2
mov r8d, 0x400
lea rdx, [0x1400ffe60]
lea rcx, [0x1400ffa60]
call sym.memcmp
test al, al
je 0x140001b69
lea rcx, str.Binblock_Patchvalidation_failed._continue____y_n_:
call sym.printf_char_const__::_
mov ecx, 1
call r12
mov rcx, rax
call sym.fflush
xor ecx, ecx
call r12
mov rcx, rax
call sym.getc
lea rcx, str.Aborted..._n
and eax, 0xffffffdf
cmp al, 0x59
jne 0x140001cb2
mov ebx, ebx
test bpl, bpl
je 0x140001b7e
sub rbx, 0x43c
mov ebp, 0x43c
jmp 0x140001b87
sub rbx, 0x3c
mov ebp, 0x3c
test r13d, r13d
je 0x140001b96
add r13d, 0x24
movsxd r13, r13d
sub rbx, r13
lea rcx, str.Patching_...
lea r15, str.reading..._b_b_b_b_b_b_b_b_b_b
call sym.printf_char_const__::_
lea r13, [0x1400ff860]
mov rcx, r15
call sym.printf_char_const__::_
mov ecx, 1
call r12
mov rcx, rax
call sym.fflush
mov eax, ebp
cmp byte [rsp + 0x36], 1
lea r11d, [rbp + 9]
mov rdx, qword [rsi + rax]
lea eax, [rbp + 8]
movzx r10d, byte [rsi + rax]
mov r9d, r10d
jne 0x140001bfc
xor eax, eax
cmp r10d, eax
jle 0x140001c1f
lea ecx, [r11 + rax]
mov cl, byte [rsi + rcx]
mov byte [r13 + rax], cl
inc rax
jmp 0x140001be6
cmp byte [rsp + 0x36], 2
jne 0x140001c1f
xor eax, eax
lea r8d, [r11 + r10]
cmp r10d, eax
jle 0x140001c1f
lea ecx, [r8 + rax]
mov cl, byte [rsi + rcx]
mov byte [r13 + rax], cl
inc rax
jmp 0x140001c09
lea rcx, str.writing..._b_b_b_b_b_b_b_b_b_b
mov dword [rsp + 0x3c], r11d
mov dword [rsp + 0x38], r10d
mov byte [rsp + 0x37], r9b
mov qword [rsp + 0x28], rdx
call sym.printf_char_const__::_
mov ecx, 1
call r12
mov rcx, rax
call sym.fflush
mov rdx, qword [rsp + 0x28]
xor r8d, r8d
mov rcx, rdi
call dbg.fseeko64
mov r9, rdi
mov edx, 1
mov rcx, r13
movzx r8d, byte [rsp + 0x37]
mov qword [rsp + 0x28], r8
call sym.fwrite
mov r10d, dword [rsp + 0x38]
mov r11d, dword [rsp + 0x3c]
lea eax, [r10 + 9]
lea ebp, [r11 + r10]
cdqe
sub rbx, rax
test r14b, r14b
je 0x140001ca2
mov r8, qword [rsp + 0x28]
lea ebp, [r11 + r10*2]
sub rbx, r8
test rbx, rbx
jne 0x140001bb0
lea rcx, str.successful._n
call sym.printf_char_const__::_
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret