Function at 0x180013b70
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 [0x1801485f0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x180013bb8
xor eax, eax
jmp 0x180013e6b
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x180013bf4
mov r8, qword [rcx + 0x58]
movsxd r9, dword [r8]
lea rcx, [rdx + r9]
cmp rdx, rcx
jae 0x180013bf4
lea ecx, [r9 - 1]
mov dword [r8], ecx
mov rdx, qword [rdi + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], r14b
mov eax, r14d
jmp 0x180013e6b
cmp qword [rdi + 0x90], 0
jne 0x180013c07
or rax, 0xffffffffffffffff
jmp 0x180013e6b
mov rdx, qword [rdi + 0x18]
lea rax, [rdi + 0x80]
cmp qword [rdx], rax
jne 0x180013c31
mov rcx, qword [rdi + 0x70]
mov rax, qword [rdi + 0x68]
mov qword [rdx], rax
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub ecx, ecx
mov rax, qword [rdi + 0x50]
mov dword [rax], ecx
cmp qword [rdi + 0x78], 0
jne 0x180013c57
movsx ecx, r14b
mov rdx, qword [rdi + 0x90]
call fcn.1800b7c98
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r14d
jmp 0x180013e69
mov byte [rbp - 0x29], r14b
xor r12d, r12d
mov qword [rbp + 7], r12
mov qword [rbp + 0xf], r12
mov r13d, 0xf
mov qword [rbp + 0xf], r13
mov qword [rbp + 7], r12
mov byte [rbp - 9], r12b
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp r13, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
or rsi, 0xffffffffffffffff
mov r9, qword [rbp + 0xf]
mov r8, qword [rbp + 7]
mov r10, qword [rbp - 9]
nop word [rax + rax]
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
lea rdx, [rbp - 9]
cmovae rdx, r10
mov rcx, qword [rdi + 0x78]
mov r10, qword [rcx]
add rax, r8
lea r8, [rbp - 0x19]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x28]
lea r8, [rbp - 0x29]
lea rdx, [rdi + 0x84]
call qword [r10 + 0x38]
test eax, eax
js 0x180013e4d
cmp eax, 1
jg 0x180013e31
lea rax, [rbp - 9]
mov r10, qword [rbp - 9]
mov r9, qword [rbp + 0xf]
cmp r9, 0x10
cmovae rax, r10
mov rbx, qword [rbp - 0x19]
sub rbx, rax
je 0x180013d5c
lea rcx, [rbp - 9]
cmp r9, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call fcn.1800b8098
cmp rbx, rax
jne 0x180013e4d
mov r9, qword [rbp + 0xf]
mov r10, qword [rbp - 9]
mov byte [rdi + 0x81], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x21], rax
jne 0x180013e2c
mov r8, qword [rbp + 7]
test rbx, rbx
jne 0x180013cb0
cmp r8, 0x20
jae 0x180013e4d
mov rax, rsi
sub rax, r8
cmp rax, 8
jbe 0x180013e1f
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x180013e12
cmp r9, rbx
jae 0x180013dc1
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.180018170
mov r9, qword [rbp + 0xf]
mov r8, qword [rbp + 7]
mov r10, qword [rbp - 9]
jmp 0x180013ddd
test rbx, rbx
jne 0x180013de6
mov qword [rbp + 7], r12
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
mov byte [rax], bl
jmp 0x180013c99
test rbx, rbx
je 0x180013cb0
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
xor ecx, ecx
mov qword [r8 + rax], rcx
mov qword [rbp + 7], rbx
lea rax, [rbp - 9]
cmp qword [rbp + 0xf], 0x10
cmovae rax, qword [rbp - 9]
mov byte [rbx + rax], cl
jmp 0x180013c99
lea rcx, str.string_too_long
call fcn.1800b0d28
int3
lea rcx, str.string_too_long
call fcn.1800b0d28
int3
mov esi, r14d
jmp 0x180013e4d
cmp eax, 3
jne 0x180013e4d
movsx ecx, byte [rbp - 0x29]
mov rdx, qword [rdi + 0x90]
call fcn.1800b7c98
cmp eax, 0xffffffff
cmovne esi, r14d
cmp qword [rbp + 0xf], 0x10
jb 0x180013e5d
mov rcx, qword [rbp - 9]
call fcn.1800b5700
mov qword [rbp + 0xf], r13
mov qword [rbp + 7], r12
mov byte [rbp - 9], 0
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1800b6c40
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret