Function at 0x1400105c0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov qword [rbp - 0x11], 0xfffffffffffffffe
mov qword [rsp + 0xe0], rbx
mov rax, qword [0x1400720d0]
xor rax, rsp
mov qword [rbp + 0x17], rax
movzx r13d, dx
mov r15, rcx
mov r12d, 0xffff
cmp r12w, dx
jne 0x14001061d
xor eax, eax
cmp dx, r12w
cmove r13w, ax
movzx eax, r13w
jmp 0x14001086e
mov rax, qword [rcx + 0x40]
mov r8, qword [rax]
test r8, r8
je 0x14001065a
mov rax, qword [rcx + 0x58]
movsxd r9, dword [rax]
lea rdx, [r8 + r9*2]
cmp r8, rdx
jae 0x14001065a
lea ecx, [r9 - 1]
mov dword [rax], ecx
mov rdx, qword [r15 + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 2]
mov qword [rdx], rcx
mov word [r8], r13w
movzx eax, r13w
jmp 0x14001086e
cmp qword [rcx + 0x80], 0
je 0x14001086a
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x140010699
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
mov rax, qword [r15 + 0x38]
mov qword [rax], rcx
sub rdx, rcx
sar rdx, 1
mov rax, qword [r15 + 0x50]
mov dword [rax], edx
cmp qword [r15 + 0x68], 0
jne 0x1400106c3
mov rdx, qword [r15 + 0x80]
movzx ecx, r13w
call fcn.14002f3c8
cmp ax, r12w
je 0x14001086a
movzx r12d, r13w
jmp 0x14001086a
mov word [rbp - 0x29], r13w
mov edx, reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rbp + 0xf], rdx
mov byte [rbp - 9], 0
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
mov rcx, qword [rbp - 9]
mov rdx, qword [rbp + 0xf]
nop word [rax + rax]
lea r8, [rbp - 9]
cmp rdx, 0x10
cmovae r8, rcx
lea rsi, [rbp - 9]
cmovae rsi, rcx
mov r14, qword [r15 + 0x68]
mov rdx, qword [r14]
mov rbx, qword [rbp + 7]
add rbx, r8
mov rdi, qword [rdx + 0x38]
mov rcx, rdi
call qword [fcn.14000cbb0]
lea rax, [rbp - 0x21]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rsi
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x27]
lea r8, [rbp - 0x29]
lea rdx, [r15 + 0x74]
mov rcx, r14
call rdi
test eax, eax
js 0x140010812
cmp eax, 1
jg 0x1400107f3
lea rax, [rbp - 9]
mov rcx, qword [rbp - 9]
mov rdx, qword [rbp + 0xf]
cmp rdx, 0x10
cmovae rax, rcx
mov rbx, qword [rbp - 0x21]
sub rbx, rax
je 0x1400107ba
lea rax, [rbp - 9]
cmp rdx, 0x10
cmovae rax, rcx
mov r9, qword [r15 + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, rax
call fcn.140030198
mov rdx, qword [rbp + 0xf]
mov rcx, qword [rbp - 9]
cmp rbx, rax
jne 0x14001081a
mov byte [r15 + 0x72], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x19], rax
jne 0x1400107ed
test rbx, rbx
jne 0x140010700
cmp qword [rbp + 7], 0x20
jae 0x14001081a
xor r8d, r8d
lea edx, [rbx + 8]
lea rcx, [rbp - 9]
call fcn.1400060f0
jmp 0x1400106f2
movzx r12d, r13w
jmp 0x14001081a
cmp eax, 3
jne 0x140010812
mov rdx, qword [r15 + 0x80]
movzx ecx, word [rbp - 0x29]
call fcn.14002f3c8
cmp ax, r12w
je 0x140010812
movzx r12d, r13w
mov rcx, qword [rbp - 9]
mov rdx, qword [rbp + 0xf]
cmp rdx, 0x10
jb 0x14001086a
lea rax, [rdx + 1]
cmp rax, 0x1000
jb 0x140010865
test byte [rbp - 9], 0x1f
je 0x140010838
call fcn.14002d398
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140010847
call fcn.14002d398
int3
sub rcx, rax
cmp rcx, 8
jae 0x140010856
call fcn.14002d398
int3
cmp rcx, 0x27
jbe 0x140010862
call fcn.14002d398
int3
mov rcx, rax
call fcn.140028b00
movzx eax, r12w
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400291d0
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret