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

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
movsxd rbx, ecx
mov rdi, rdx
call dbg.__main
mov ecx, 2
mov rsi, qword [dbg.__acrt_iob_func]
call rsi
lea r9, str.Feb_26_2024
lea r8, str.snip_0.1
mov rcx, rax
lea rax, str.16:19:34
lea rdx, str._s__s__s_n_n
mov qword [rsp + 0x20], rax
call sym.fprintf
cmp ebx, 1
jle 0x140007e8a
mov rdx, qword [rdi + rbx*8 - 8]
cmp byte [rdx], 0x2d
je 0x140007e8a
mov r8d, 0x400
lea rcx, [0x14000c460]
call sym.strncpy
lea rdx, [0x140009127]
lea rcx, [0x14000c460]
call sym.fopen
mov rbx, rax
test rax, rax
je 0x140007eda
mov r8d, 2
xor edx, edx
mov rcx, rax
call sym.fseek
mov rcx, rbx
call sym.ftell
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov dword [0x14000c048], eax
call sym.fseek
mov r12d, dword [0x14000c048]
test r12d, r12d
je 0x140007ec7
movsxd rdi, r12d
mov rcx, rdi
call sym.malloc
mov qword [0x14000c040], rax
mov rcx, rax
test rax, rax
je 0x140007eb8
mov r9, rbx
mov r8, rdi
mov edx, 1
call sym.fread
test rax, rax
je 0x140007ea5
mov ecx, 2
xor ebx, ebx
movabs rdi, 0x7261745350494e53
call rsi
lea r8, [0x14000c460]
lea rdx, str....reading___s_n
mov rcx, rax
call sym.fprintf
cmp dword [0x14000c048], 0xd
jg 0x140007d34
jmp 0x140007e57
mov eax, dword [0x14000c048]
add ebx, 1
sub eax, 0xd
cmp eax, ebx
jle 0x140007e57
mov rdx, qword [0x14000c040]
movsxd rax, ebx
add rax, rdx
cmp qword [rax], rdi
jne 0x140007d20
cmp word [rax + 8], 0x74
jne 0x140007d20
lea ebp, [rbx + 0xa]
mov r8d, 0x3ff
lea rcx, [0x14000c060]
movsxd rbp, ebp
add rdx, rbp
call sym.strncpy
lea rdx, [0x1400091e4]
lea rcx, [0x14000c060]
call sym.fopen
mov r12, rax
test rax, rax
je 0x140007e92
mov ecx, 2
call rsi
lea r8, [0x14000c060]
lea rdx, str....snipping__s_n
mov rcx, rax
call sym.fprintf
mov r13, qword [0x14000c040]
lea rcx, [r13 + rbp]
call sym.strlen
lea r9d, [rbx + rax + 0xb]
mov eax, dword [0x14000c048]
movsxd r10, r9d
lea r8d, [rax - 0xd]
cmp r8d, r9d
jle 0x140007e85
lea rax, [r13 + r10]
mov edx, r9d
jmp 0x140007dfb
mov ecx, 1
mov ebx, edx
lea edx, [rdx + 1]
test ecx, ecx
je 0x140007e20
add rax, 1
cmp r8d, edx
je 0x140007e80
cmp dword [rax], 0x50494e53
jne 0x140007de0
cmp word [rax + 4], 0x6e45
jne 0x140007de0
xor ecx, ecx
cmp byte [rax + 6], 0x64
jne 0x140007de0
mov ebx, edx
lea edx, [rdx + 1]
test ecx, ecx
jne 0x140007dee
nop dword [rax]
mov edx, ebx
lea rcx, [r13 + r10]
mov r8d, 1
add ebx, 1
sub edx, r9d
mov r9, r12
movsxd rdx, edx
call sym.fwrite
mov rcx, r12
call sym.fclose
mov eax, dword [0x14000c048]
sub eax, 0xd
cmp eax, ebx
jg 0x140007d34
mov ecx, 2
call rsi
lea rdx, str....done_n
mov rcx, rax
call sym.fprintf
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov ebx, r8d
jmp 0x140007e20
mov rbx, r10
jmp 0x140007e20
mov rcx, qword [rdi]
call sym.usage
lea rdx, [0x14000c060]
lea rcx, str.Couldnt_open__s_for_writing._n
call sym.prerror
lea rdx, [0x14000c460]
lea rcx, str.Couldnt_read_from__s_n
call sym.prerror
mov edx, r12d
lea rcx, str.Couldnt_allocate__d_bytes_to_hold_bin_n
call sym.prerror
lea rdx, [0x14000c460]
lea rcx, str.The_file_size_of__s_is_0_bytes._n
call sym.prerror
lea rdx, [0x14000c460]
lea rcx, str.Couldnt_open__s_for_reading._n
call sym.prerror
nop
nop
nop