Function at 0x180003930
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 [0x1800341c8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x180003982
xor r15d, r15d
cmp edx, edx
cmovne r15d, edx
mov eax, r15d
jmp 0x180003c8e
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1800039be
mov r8, qword [rcx + 0x58]
movsxd r9, dword [r8]
lea rcx, [rdx + r9]
cmp rdx, rcx
jae 0x1800039be
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 0x180003c8e
cmp qword [rdi + 0x80], 0
jne 0x1800039d1
or rax, 0xffffffffffffffff
jmp 0x180003c8e
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x1800039fe
mov rdx, qword [rdi + 0x90]
mov rcx, qword [rdi + 0x88]
mov qword [r8], rcx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
cmp qword [rdi + 0x68], 0
jne 0x180003a24
movsx ecx, r14b
mov rdx, qword [rdi + 0x80]
call fcn.18000d8fc
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r14d
jmp 0x180003c8c
mov byte [rbp - 0x29], r14b
mov edx, 0xf
mov qword [rbp + 0xf], rdx
mov byte [rbp - 9], 0
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
xor r15d, r15d
or rsi, 0xffffffffffffffff
lea r13, vtable.std::codecvt_char__char__struct__Mbstatet_.0
mov r8, qword [rbp + 0xf]
mov rcx, qword [rbp + 7]
mov rdx, qword [rbp - 9]
nop dword [rax]
lea rax, [rbp - 9]
cmp r8, 0x10
cmovae rax, rdx
lea r9, [rbp - 9]
cmovae r9, rdx
mov r10, qword [rdi + 0x68]
lea rdx, [rcx + rax]
mov rax, qword [r10]
cmp rax, r13
je 0x180003c02
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], r9
lea rcx, [rbp - 0x21]
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x28]
lea r8, [rbp - 0x29]
lea rdx, [rdi + 0x74]
mov rcx, r10
call qword [rax + 0x38]
test eax, eax
js 0x180003c25
cmp eax, 1
jg 0x180003bfb
lea rax, [rbp - 9]
mov rdx, qword [rbp - 9]
mov r8, qword [rbp + 0xf]
cmp r8, 0x10
cmovae rax, rdx
mov rbx, qword [rbp - 0x19]
sub rbx, rax
je 0x180003b25
lea rcx, [rbp - 9]
cmp r8, 0x10
cmovae rcx, rdx
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
call fcn.18000e8b8
mov r8, qword [rbp + 0xf]
mov rdx, qword [rbp - 9]
cmp rbx, rax
jne 0x180003c2d
mov byte [rdi + 0x71], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x21], rax
jne 0x180003bf6
mov rcx, qword [rbp + 7]
test rbx, rbx
jne 0x180003a70
cmp rcx, 0x20
jae 0x180003c2d
mov rax, rsi
sub rax, rcx
cmp rax, 8
jbe 0x180003be9
lea rbx, [rcx + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x180003bdc
cmp r8, rbx
jae 0x180003b8a
mov r8, rcx
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.180006d90
mov r8, qword [rbp + 0xf]
mov rcx, qword [rbp + 7]
mov rdx, qword [rbp - 9]
jmp 0x180003ba7
test rbx, rbx
jne 0x180003bb0
mov qword [rbp + 7], r15
lea rax, [rbp - 9]
cmp r8, 0x10
cmovae rax, rdx
mov byte [rax], r15b
jmp 0x180003a60
test rbx, rbx
je 0x180003a70
lea rax, [rbp - 9]
cmp r8, 0x10
cmovae rax, rdx
xor edx, edx
mov qword [rcx + rax], rdx
mov qword [rbp + 7], rbx
lea rax, [rbp - 9]
cmp qword [rbp + 0xf], 0x10
cmovae rax, qword [rbp - 9]
mov byte [rax + rbx], dl
jmp 0x180003a60
lea rcx, str.string_too_long
call fcn.180007718
int3
lea rcx, str.string_too_long
call fcn.180007718
int3
mov esi, r14d
jmp 0x180003c2d
cmp eax, 3
je 0x180003c0e
jmp 0x180003c25
lea rax, [rbp - 0x29]
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x19], r9
movsx ecx, byte [rbp - 0x29]
mov rdx, qword [rdi + 0x80]
call fcn.18000d8fc
cmp eax, 0xffffffff
cmovne esi, r14d
mov rdx, qword [rbp - 9]
mov r8, qword [rbp + 0xf]
cmp r8, 0x10
jb 0x180003c8c
inc r8
cmp r8, 0xffffffffffffffff
jbe 0x180003c42
call fcn.18000d660
int3
cmp r8, 0x1000
jb 0x180003c84
test byte [rbp - 9], 0x1f
je 0x180003c57
call fcn.18000d660
int3
mov rax, qword [rdx - 8]
cmp rax, rdx
jb 0x180003c66
call fcn.18000d660
int3
sub rdx, rax
cmp rdx, 8
jae 0x180003c75
call fcn.18000d660
int3
cmp rdx, 0x27
jbe 0x180003c81
call fcn.18000d660
int3
mov rdx, rax
mov rcx, rdx
call fcn.180008d38
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180008cd0
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret