Function at 0x1400c1950
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
movzx r14d, dx
mov rdi, rcx
mov esi, 0xffff
cmp si, dx
jne 0x1400c198f
xor r15d, r15d
movzx eax, r15w
jmp 0x1400c1c27
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400c19d0
mov r8, qword [rcx + 0x58]
movsxd r9, dword [r8]
mov rax, r9
lea rcx, [rdx + r9*2]
cmp rdx, rcx
jae 0x1400c19d0
lea eax, [r9 - 1]
mov dword [r8], eax
mov rcx, qword [rdi + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 2]
mov qword [rcx], rax
mov word [rdx], r14w
movzx eax, r14w
jmp 0x1400c1c27
cmp qword [rdi + 0x90], 0
je 0x1400c1c24
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x80]
cmp qword [r8], rax
jne 0x1400c1a0c
mov rdx, qword [rdi + 0x70]
mov rcx, qword [rdi + 0x68]
mov qword [r8], rcx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub rdx, rcx
sar rdx, 1
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
cmp qword [rdi + 0x78], 0
jne 0x1400c1a35
mov rdx, qword [rdi + 0x90]
movzx ecx, r14w
call fcn.1400ed7e8
cmp ax, si
je 0x1400c1c24
movzx esi, r14w
jmp 0x1400c1c24
mov word [rbp - 0x30], r14w
mov edx, 0xf
mov qword [rbp - 8], rdx
mov byte [rbp - 0x20], 0
xor ecx, ecx
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x10], 8
lea rax, [rbp - 0x20]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
xor r15d, r15d
mov r8, qword [rbp - 8]
mov r9, qword [rbp - 0x10]
nop
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x20]
cmovae rdx, qword [rbp - 0x20]
mov rcx, qword [rdi + 0x78]
mov r10, qword [rcx]
add rax, r9
lea r8, [rbp + 0x40]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x2e]
lea r8, [rbp - 0x30]
lea rdx, [rdi + 0x84]
call qword [r10 + 0x38]
test eax, eax
js 0x1400c1c11
cmp eax, 1
jg 0x1400c1bed
lea rax, [rbp - 0x20]
mov r10, qword [rbp - 0x20]
mov r8, qword [rbp - 8]
cmp r8, 0x10
cmovae rax, r10
mov rbx, qword [rbp + 0x40]
sub rbx, rax
je 0x1400c1b1a
lea rcx, [rbp - 0x20]
cmp r8, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call fcn.1400ec320
mov r8, qword [rbp - 8]
cmp rbx, rax
jne 0x1400c1c15
mov byte [rdi + 0x82], 1
lea rax, [rbp - 0x30]
cmp qword [rbp + 0x48], rax
jne 0x1400c1c0b
mov r9, qword [rbp - 0x10]
test rbx, rbx
jne 0x1400c1a70
cmp r9, 0x20
jae 0x1400c1c15
or rax, 0xffffffffffffffff
sub rax, r9
cmp rax, 8
jbe 0x1400c1be0
lea rbx, [r9 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x1400c1bd3
cmp r8, rbx
jae 0x1400c1b7f
mov r8, r9
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.14000c1b0
mov r8, qword [rbp - 8]
mov r9, qword [rbp - 0x10]
jmp 0x1400c1b9d
test rbx, rbx
jne 0x1400c1ba6
mov qword [rbp - 0x10], r15
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
mov byte [rax], r15b
jmp 0x1400c1a67
test rbx, rbx
je 0x1400c1a70
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
xor ecx, ecx
mov qword [r9 + rax], rcx
mov qword [rbp - 0x10], rbx
lea rax, [rbp - 0x20]
cmp qword [rbp - 8], 0x10
cmovae rax, qword [rbp - 0x20]
mov byte [rbx + rax], cl
jmp 0x1400c1a67
lea rcx, str.string_too_long
call fcn.1400e4de4
int3
lea rcx, str.string_too_long
call fcn.1400e4de4
int3
cmp eax, 3
jne 0x1400c1c11
mov rdx, qword [rdi + 0x90]
movzx ecx, word [rbp - 0x30]
call fcn.1400ed7e8
mov r8, qword [rbp - 8]
cmp ax, si
je 0x1400c1c15
movzx esi, r14w
jmp 0x1400c1c15
mov r8, qword [rbp - 8]
cmp r8, 0x10
jb 0x1400c1c24
mov rcx, qword [rbp - 0x20]
call fcn.1400e5d34
movzx eax, si
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret