Function at 0x140016310
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x48
mov eax, dword [0x140076a14]
test eax, eax
jne 0x14002f2c0
xor eax, eax
add rsp, 0x48
ret
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x40], rsi
mov rsi, rcx
mov ebx, 0x20
lea r9, [0x140032820]
lea rcx, [0x140049a00]
lea r8d, [rbx + 8]
mov rdx, rax
mov qword [rsp + 0x38], rdi
mov edi, dword [0x140044824]
call fcn.140016860
mov r11d, dword [0x140076a14]
test r11d, r11d
je 0x14002f36b
lea rcx, [0x140049a08]
mov rdx, r11
mov eax, dword [rcx + 0x10]
add rcx, 0x28
add eax, dword [rcx - 0x28]
sub rdx, 1
lea ebx, [rbx + rax + 9]
jne 0x14002f30d
cmp ebx, 0x2067
jb 0x14002f36b
movaps xmmword [rsp + 0x20], xmm6
pxor xmm6, xmm6
mov eax, ebx
cvtsi2sd xmm6, rax
mulsd xmm6, qword [0x14003d540]
call fcn.1400163a4
movapd xmm2, xmm6
lea rdx, str._nTag_is__.1f_Kbyte_long._This_is_longer_than_the_maximum_recommended_8_KByte._n_a
lea rcx, [rax + 0x60]
movq r8, xmm2
call fcn.1400165e4
mov r11d, dword [0x140076a14]
movaps xmm6, xmmword [rsp + 0x20]
mov eax, edi
mov edx, 1
mov byte [0x140048198], dil
shr eax, 8
mov byte [0x1400481a0], r11b
shr r11d, 8
mov byte [0x140048199], al
mov eax, edi
lea r8d, [rdx + 0x1f]
shr eax, 0x10
lea rcx, str.APETAGEX
shr edi, 0x18
mov byte [0x14004819a], al
mov eax, ebx
mov r9, rsi
shr eax, 8
mov byte [0x14004819b], dil
mov byte [0x14004819c], bl
mov byte [0x14004819d], al
mov eax, ebx
mov byte [0x1400481a1], r11b
shr eax, 0x10
mov byte [0x1400481a7], 0xa0
mov byte [0x14004819e], al
mov eax, ebx
shr eax, 0x18
mov byte [0x14004819f], al
movzx eax, byte [0x140076a16]
mov byte [0x1400481a2], al
movzx eax, byte [0x140076a17]
mov byte [0x1400481a3], al
call fcn.1400173a4
cmp dword [0x140076a14], 0
lea edi, [rax - 0x20]
jbe 0x14002f4f8
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x30], r12
xor r12d, r12d
lea rbp, [0x140049a18]
movzx ecx, byte [rbp]
mov edx, 1
mov r9, rsi
mov byte [rsp + 0x68], cl
mov rcx, qword [rbp]
lea r8d, [rdx + 7]
mov rax, rcx
shr rax, 8
mov byte [rsp + 0x69], al
mov rax, rcx
shr rcx, 0x18
shr rax, 0x10
mov byte [rsp + 0x6b], cl
mov ecx, dword [rbp + 8]
mov byte [rsp + 0x6a], al
movzx eax, byte [rbp + 8]
mov byte [rsp + 0x6c], al
mov eax, ecx
shr eax, 8
mov byte [rsp + 0x6d], al
mov eax, ecx
shr ecx, 0x18
mov byte [rsp + 0x6f], cl
shr eax, 0x10
lea rcx, [rsp + 0x68]
mov byte [rsp + 0x6e], al
call fcn.1400173a4
mov r8, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x18]
mov r9, rsi
mov edx, 1
add edi, eax
call fcn.1400173a4
mov edx, 1
lea rcx, [0x140036190]
mov r9, rsi
mov r8, rdx
add edi, eax
call fcn.1400173a4
mov r8, qword [rbp]
add edi, eax
test r8, r8
je 0x14002f4da
mov rcx, qword [rbp - 8]
mov r9, rsi
mov edx, 1
call fcn.1400173a4
add edi, eax
inc r12d
add rbp, 0x28
cmp r12d, dword [0x140076a14]
jb 0x14002f428
mov r12, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x58]
mov edx, 1
lea rcx, str.APETAGEX
mov r9, rsi
lea r8d, [rdx + 0x1f]
mov byte [0x1400481a7], 0x80
call fcn.1400173a4
mov rsi, qword [rsp + 0x40]
add edi, eax
cmp ebx, edi
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x50]
je 0x14002f541
call fcn.1400163a4
lea rdx, str._nError_writing_APE_tag._n
lea rcx, [rax + 0x60]
call fcn.1400165e4
mov dword [0x140076a14], 0
jmp 0x140016322