Function at 0x140002a80
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov r12d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x140002aac
xor eax, eax
jmp 0x140002d60
mov rcx, qword [rcx + 0x48]
cmp qword [rcx], 0
je 0x140002ae3
mov rcx, qword [rcx]
mov rdx, qword [rdi + 0x60]
movsxd rax, dword [rdx]
add rax, rcx
cmp rcx, rax
jae 0x140002ae3
dec dword [rdx]
mov rcx, qword [rdi + 0x48]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r12b
mov eax, r12d
jmp 0x140002d60
cmp qword [rdi + 0x98], 0
jne 0x140002af5
or eax, 0xffffffff
jmp 0x140002d60
mov rdx, qword [rdi + 0x20]
lea rax, [rdi + 0x88]
cmp qword [rdx], rax
jne 0x140002b1f
mov rcx, qword [rdi + 0x78]
mov rax, qword [rdi + 0x70]
mov qword [rdx], rax
mov rax, qword [rdi + 0x40]
mov qword [rax], rcx
sub ecx, ecx
mov rax, qword [rdi + 0x58]
mov dword [rax], ecx
cmp qword [rdi + 0x80], 0
jne 0x140002b48
movsx ecx, r12b
mov rdx, qword [rdi + 0x98]
call fcn.1400061d4
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r12d
jmp 0x140002d5e
mov byte [rbp + 0x48], r12b
mov edx, 0xf
mov qword [rbp - 0x10], rdx
mov byte [rbp - 0x28], 0
xor ecx, ecx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], 8
lea rax, [rbp - 0x28]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
or rsi, 0xffffffffffffffff
xor r14d, r14d
mov r9, qword [rbp - 0x10]
mov r8, qword [rbp - 0x18]
mov r10, qword [rbp - 0x28]
nop dword [rax]
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, r10
lea rdx, [rbp - 0x28]
cmovae rdx, r10
mov rcx, qword [rdi + 0x80]
mov r10, qword [rcx]
add rax, r8
lea r8, [rbp + 0x50]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
lea rax, [rbp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x49]
lea r8, [rbp + 0x48]
lea rdx, [rdi + 0x8c]
call qword [r10 + 0x28]
test eax, eax
js 0x140002d4e
cmp eax, 1
jg 0x140002d30
lea rax, [rbp - 0x28]
mov r10, qword [rbp - 0x28]
mov r9, qword [rbp - 0x10]
cmp r9, 0x10
cmovae rax, r10
mov rbx, qword [rbp + 0x50]
sub rbx, rax
je 0x140002c3f
lea rcx, [rbp - 0x28]
cmp r9, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x98]
mov r8, rbx
mov edx, 1
call fcn.140007bd4
cmp rbx, rax
jne 0x140002cf6
mov r9, qword [rbp - 0x10]
mov r10, qword [rbp - 0x28]
mov byte [rdi + 0x89], 1
lea rax, [rbp + 0x48]
cmp qword [rbp + 0x58], rax
jne 0x140002d1d
mov r8, qword [rbp - 0x18]
test rbx, rbx
jne 0x140002b90
cmp r8, 0x20
jae 0x140002d12
mov rax, rsi
sub rax, r8
cmp rax, 8
jbe 0x140002d05
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140002cf8
cmp r9, rbx
jae 0x140002ca4
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.140004860
mov r9, qword [rbp - 0x10]
mov r8, qword [rbp - 0x18]
mov r10, qword [rbp - 0x28]
jmp 0x140002cc1
test rbx, rbx
jne 0x140002cca
mov qword [rbp - 0x18], r14
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, r10
mov byte [rax], r14b
jmp 0x140002b7d
test rbx, rbx
je 0x140002b90
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, r10
xor ecx, ecx
mov qword [rax + r8], rcx
mov qword [rbp - 0x18], rbx
lea rax, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rax, qword [rbp - 0x28]
mov byte [rbx + rax], cl
jmp 0x140002b7d
jmp 0x140002d4e
lea rcx, str.string_too_long
call fcn.140005b64
int3
lea rcx, str.string_too_long
call fcn.140005b64
nop
cmp r9, 0x10
jb 0x140002d5e
mov rcx, r10
jmp 0x140002d59
cmp r9, 0x10
jb 0x140002d2b
mov rcx, r10
call fcn.1400079b8
mov eax, r12d
jmp 0x140002d60
cmp eax, 3
jne 0x140002d4e
movsx ecx, byte [rbp + 0x48]
mov rdx, qword [rdi + 0x98]
call fcn.1400061d4
cmp eax, 0xffffffff
cmovne esi, r12d
jmp 0x140002d4e
cmp qword [rbp - 0x10], 0x10
jb 0x140002d5e
mov rcx, qword [rbp - 0x28]
call fcn.1400079b8
mov eax, esi
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret