Function at 0x180003e40
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 [0x1800ea550]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r12d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x180003e88
xor eax, eax
jmp 0x180004150
mov rdx, qword [rcx + 0x48]
cmp qword [rdx], 0
je 0x180003ec0
mov rdx, qword [rdx]
mov r8, qword [rcx + 0x60]
movsxd rcx, dword [r8]
add rcx, rdx
cmp rdx, rcx
jae 0x180003ec0
dec dword [r8]
mov rdx, qword [rdi + 0x48]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], r12b
mov eax, r12d
jmp 0x180004150
cmp qword [rdi + 0x98], 0
jne 0x180003ed2
or eax, 0xffffffff
jmp 0x180004150
mov rdx, qword [rdi + 0x20]
lea rax, [rdi + 0x88]
cmp qword [rdx], rax
jne 0x180003efc
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 0x180003f25
movsx ecx, r12b
mov rdx, qword [rdi + 0x98]
call fcn.180075708
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r12d
jmp 0x18000414e
mov byte [rbp - 0x29], r12b
mov r15d, 0xf
mov qword [rbp + 0xf], r15
xor r14d, r14d
mov qword [rbp + 7], r14
mov byte [rbp - 9], r14b
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp r15, 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 dword [rax + rax]
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
lea rdx, [rbp - 9]
cmovae rdx, r10
mov rcx, qword [rdi + 0x80]
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 + 0x8c]
call qword [r10 + 0x28]
test eax, eax
js 0x180004132
cmp eax, 1
jg 0x180004114
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 0x18000401f
lea rcx, [rbp - 9]
cmp r9, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x98]
mov r8, rbx
mov edx, 1
call fcn.180075d2c
cmp rbx, rax
jne 0x1800040d5
mov r9, qword [rbp + 0xf]
mov r10, qword [rbp - 9]
mov byte [rdi + 0x89], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x21], rax
jne 0x1800040f3
mov r8, qword [rbp + 7]
test rbx, rbx
jne 0x180003f70
cmp r8, 0x20
jae 0x1800040f1
mov rax, rsi
sub rax, r8
cmp rax, 8
jbe 0x1800040e4
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x1800040d7
cmp r9, rbx
jae 0x180004084
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.180008d20
mov r9, qword [rbp + 0xf]
mov r8, qword [rbp + 7]
mov r10, qword [rbp - 9]
jmp 0x1800040a0
test rbx, rbx
jne 0x1800040a9
mov qword [rbp + 7], r14
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
mov byte [rax], bl
jmp 0x180003f5f
test rbx, rbx
je 0x180003f70
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 0x180003f5f
jmp 0x180004132
lea rcx, str.string_too_long
call fcn.1800724f8
int3
lea rcx, str.string_too_long
call fcn.1800724f8
nop
jmp 0x180004132
cmp qword [rbp + 0xf], 0x10
jb 0x180004103
mov rcx, qword [rbp - 9]
call fcn.18007309c
mov qword [rbp + 0xf], r15
mov qword [rbp + 7], r14
mov byte [rbp - 9], 0
mov eax, r12d
jmp 0x180004150
cmp eax, 3
jne 0x180004132
movsx ecx, byte [rbp - 0x29]
mov rdx, qword [rdi + 0x98]
call fcn.180075708
cmp eax, 0xffffffff
cmovne esi, r12d
jmp 0x180004132
cmp qword [rbp + 0xf], 0x10
jb 0x180004142
mov rcx, qword [rbp - 9]
call fcn.18007309c
mov byte [rbp - 9], 0
mov qword [rbp + 7], r14
mov qword [rbp + 0xf], r15
mov eax, esi
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.180073c80
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret