Function at 0x14017a610
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor r12d, r12d
mov qword [rsp + 0x40], rcx
mov qword [r11 - 0x50], r12
mov esi, r8d
mov dword [r11 + 0x20], r12d
mov rbp, rdx
mov rdi, rcx
mov ebx, r12d
mov r15d, r12d
mov r14d, r12d
test rcx, rcx
je 0x14017aacb
lea rax, [rcx + 0x58]
mov qword [rsp + 0x48], rax
mov rax, qword [rax]
test rax, rax
je 0x14017a685
mov r9d, r8d
mov dword [rsp + 0x28], 1
mov r8, rdx
mov dword [r11 - 0x68], r12d
lea edx, [r12 + 3]
call rax
mov ebx, eax
test eax, eax
jle 0x14017aacd
mov r9, qword [rsp + 0x90]
mov r13d, 0xffffffff
mov qword [rsp + 0x30], r9
lea r8, [0x140000000]
test ebx, ebx
js 0x14017aa85
mov rax, qword [rdi + 8]
test rax, rax
je 0x14017a6d2
mov r9, qword [rax + 0x108]
test r9, r9
je 0x14017a6cd
mov r8d, esi
mov rdx, rbp
mov rcx, rdi
call r9
jmp 0x14017a9eb
mov r9, qword [rsp + 0x30]
movzx edx, byte [rdi + 0x7c]
lea eax, [rdx - 2]
cmp eax, 6
ja case.default.0x14017a6ef
cdqe
mov ecx, dword [r8 + rax*4 + 0x17aae8]
add rcx, r8
jmp rcx
mov dword [rsp + 0x90], r12d
test rbp, rbp
je 0x14017a7c5
xor r8d, r8d
lea r9, [rsp + 0x90]
test byte [rdi + 0x78], 1
mov edx, esi
mov rcx, rbp
je 0x14017a72f
call fcn.14020e4e0
cmp eax, 0xffffff36
je 0x14017a736
mov r15d, r13d
mov ebx, r13d
jmp case.default.0x14017a6ef
call fcn.14020e4c0
jmp 0x14017a71d
mov eax, dword [rsp + 0x90]
test eax, eax
jne 0x14017a754
mov dword [rsp + 0xa8], r12d
mov r15d, r12d
mov ebx, r12d
jmp case.default.0x14017a6ef
mov rcx, rax
call fcn.1401c5b90
mov rbx, rax
test rax, rax
je 0x14017a724
test byte [rdi + 0x78], 1
lea r9, [rsp + 0x90]
mov r8, rax
mov edx, esi
mov rcx, rbp
je 0x14017a796
call fcn.14020e4e0
test eax, eax
jns 0x14017a79d
mov rcx, rbx
call fcn.1401c5b70
mov r15d, r13d
mov ebx, r13d
jmp case.default.0x14017a6ef
call fcn.14020e4c0
jmp 0x14017a77f
test r14, r14
je 0x14017a7aa
mov rcx, r14
call fcn.1401c5b70
mov ecx, dword [rsp + 0x90]
mov r14, rbx
mov dword [rsp + 0xa8], ecx
mov r15d, esi
mov qword [rsp + 0x38], rbx
jmp 0x14017a7d2
mov ecx, dword [rsp + 0xa8]
mov r15d, 0xffffff53
mov ebx, r15d
test r15d, r15d
jle case.default.0x14017a6ef
mov rbp, r14
mov esi, ecx
jmp case.default.0x14017a6ef
test rbp, rbp
je 0x14017a8a2
mov ebx, 0xfffffffe
cmp dl, 5
je 0x14017a803
mov ebx, r12d
jmp case.default.0x14017a6ef
cmp qword [rdi + 0x20], 0
je 0x14017a887
movsxd rax, dword [rdi + 0x64]
test esi, esi
jne 0x14017a826
mov r9, rax
mov ebx, r12d
add r9, qword [rdi + 0x30]
mov qword [rsp + 0x30], r9
jmp case.default.0x14017a6ef
mov edx, dword [rdi + 0x68]
cmp eax, edx
jge 0x14017a837
mov r8d, dword [rdi + 0x60]
mov ecx, edx
sub ecx, eax
jmp 0x14017a862
test edx, edx
jle 0x14017a843
cmp eax, edx
je 0x14017a727
mov r8d, dword [rdi + 0x60]
mov ecx, r8d
sub ecx, eax
test ecx, ecx
jg 0x14017a862
test edx, edx
je 0x14017a727
mov eax, r12d
mov ecx, edx
jg 0x14017a862
mov ecx, r8d
cmp esi, ecx
movsxd r9, eax
mov ebx, esi
cmovge ebx, ecx
add r9, qword [rdi + 0x30]
add eax, ebx
mov qword [rsp + 0x30], r9
mov dword [rdi + 0x64], eax
cmp eax, r8d
jne 0x14017a887
test edx, edx
jle 0x14017a887
mov dword [rdi + 0x64], r12d
test ebx, ebx
jle case.default.0x14017a6ef
movsxd r8, ebx
mov rdx, rbp
mov rcx, r9
call fcn.140284ff0
jmp case.default.0x14017a6ef
mov ebx, 0xffffff53
jmp case.default.0x14017a6ef
mov rbx, qword [rdi]
test rbx, rbx
je 0x14017a74c
test rbp, rbp
je 0x14017a74c
test esi, esi
jne 0x14017a8cd
lea ebx, [rsi + 1]
jmp case.default.0x14017a6ef
mov r13d, dword [rdi + 0x60]
add r13d, esi
movsxd r14, r13d
js 0x14017a958
cmp qword [rbx + 8], r14
ja 0x14017a917
cmp qword [rbx + 0x10], r14
jae 0x14017a917
lea ecx, [r13 + 3]
mov eax, 0x55555556
imul ecx
mov rcx, qword [rbx]
mov eax, edx
shr eax, 0x1f
add edx, eax
shl edx, 2
movsxd r12, edx
mov rdx, r12
call fcn.1401c5bb0
test rax, rax
je 0x14017a955
mov qword [rbx + 0x10], r12
xor r12d, r12d
mov qword [rbx], rax
mov qword [rbx + 8], r14
test r13d, r13d
je 0x14017a958
mov rax, qword [rdi]
mov rdx, rbp
movsxd rcx, dword [rdi + 0x60]
movsxd r8, esi
add rcx, qword [rax]
call fcn.140284ff0
mov rcx, qword [rdi]
mov ebx, esi
mov r13d, 0xffffffff
mov rax, qword [rcx]
mov qword [rdi + 0x30], rax
mov eax, dword [rcx + 0x10]
add dword [rdi + 0x60], esi
mov dword [rdi + 0x70], eax
jmp case.default.0x14017a6ef
xor r12d, r12d
mov ebx, r12d
mov r13d, 0xffffffff
jmp case.default.0x14017a6ef
mov r9, qword [rdi + 0x30]
test r9, r9
je 0x14017a984
movsxd r8, esi
mov edx, 1
mov rcx, rbp
call fcn.14028d3c8
mov rbx, rax
jmp case.default.0x14017a6ef
mov ebx, 0xffffff52
jmp case.default.0x14017a6ef
cmp qword [rdi + 0x18], 0
je case.default.0x14017a6ef
mov ebx, r12d
test rbp, rbp
je 0x14017a8a2
mov r14, qword [rdi + 0x30]
mov rcx, r14
call fcn.14017cf80
mov rdx, rbp
mov rcx, r14
cmp eax, 0x357
jne 0x14017a9c9
mov r8d, esi
call fcn.14017cc40
cmp eax, 1
je case.default.0x14017a6ef
mov ebx, r13d
jmp case.default.0x14017a6ef
movsxd r8, esi
call fcn.14017cc90
cmp eax, 1
cmovne ebx, r13d
jmp case.default.0x14017a6ef
mov ecx, dword [rdi + 0x70]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
call fcn.140207060
mov ebx, eax
mov rdi, qword [rdi + 0x18]
mov r14, qword [rsp + 0x38]
test rdi, rdi
je 0x14017aa85
mov r9, qword [rsp + 0x30]
jmp 0x14017a698
mov r13, qword [rsp + 0x40]
cmp dword [r13 + 0x74], 0
je 0x14017aa1c
mov ebx, 0xffffffff
jmp 0x14017aa8a
mov rcx, qword [rdi + 0x30]
test rcx, rcx
jne 0x14017aa2c
mov ebx, 0xffffff53
jmp 0x14017aa8a
and dword [rdi + 0x78], 0xffffffef
mov r8d, esi
mov rdx, rbp
call fcn.140181290
mov edx, eax
test eax, eax
je 0x14017aa79
test eax, eax
jns 0x14017aa81
mov rax, qword [rdi + 0x30]
test rax, rax
je 0x14017aa79
mov eax, dword [rax + 0x390]
lea ecx, [rax + 0x147]
test ecx, 0xfffffffb
je 0x14017aa71
cmp eax, 0xfffffea9
je 0x14017aa79
add eax, 0xfffffffe
cmp eax, 1
ja 0x14017aa79
or dword [rdi + 0x78], 0x10
mov ebx, edx
jmp 0x14017aa8a
mov dword [r13 + 0x74], 1
mov ebx, edx
jmp 0x14017aa8a
mov r13, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
test rax, rax
je 0x14017aab2
mov dword [rsp + 0x28], ebx
mov r9d, esi
mov r8, rbp
mov dword [rsp + 0x20], r12d
mov edx, 0x83
mov rcx, r13
call rax
mov ebx, eax
test r14, r14
je 0x14017aabf
mov rcx, r14
call fcn.1401c5b70
test r15d, r15d
jle 0x14017aacb
mov eax, r15d
test ebx, ebx
jg 0x14017aacd
mov eax, ebx
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret