Function at 0x14001c7f0
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0x150
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x70], rdi
mov rdi, rcx
vmovups xmmword [rbp + 0x50], xmm9
mov qword [rbp + 0x68], r15
mov qword [rbp + 0x88], r12
mov qword [rbp + 0x78], rsi
lea rsi, [rdi + 0x10]
mov qword [rbp + 0x80], rbx
mov rax, qword [0x1400a3fc0]
xor rax, rbp
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x60], 0xfffffffffffffffe
cmp qword [rsi + 0x80], 0
jne 0x14001c850
xor ebx, ebx
xor r12d, r12d
jmp 0x14001c92c
mov rdx, qword [rsi + 0x18]
lea rax, [rdi + 0x80]
cmp rax, qword [rdx]
je 0x14001cff6
mov rbx, rsi
cmp qword [rsi + 0x68], 0
je 0x14001c874
cmp byte [rsi + 0x71], 0
jne 0x14001c87c
xor r12d, r12d
jmp 0x14001c919
mov rax, qword [rsi]
mov rcx, rsi
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14001c914
mov rcx, qword [rsi + 0x68]
mov r10, rsp
lea rdx, [rdi + 0x84]
lea r8, [rbp + 0xf0]
mov r11, qword [rcx]
lea r9, [rbp + 0x110]
lea rax, [rbp + 0x28]
mov qword [r10 + 0x20], rax
call qword [r11 + 0x40]
test eax, eax
je 0x14001c8d5
cmp eax, 1
je 0x14001c8d9
cmp eax, 3
jne 0x14001c914
mov byte [rsi + 0x71], 0
xor r12d, r12d
jmp 0x14001c919
mov byte [rsi + 0x71], 0
mov r12, qword [rbp + 0x28]
lea rax, [rbp + 0xf0]
sub r12, rax
je 0x14001c90a
mov r9, qword [rsi + 0x80]
lea rcx, [rbp + 0xf0]
mov edx, 1
mov r8, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp r12, rax
jne 0x14001c914
cmp byte [rsi + 0x71], 0
je 0x14001c874
xor ebx, ebx
xor r12d, r12d
mov rcx, qword [rsi + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
cmovne rbx, r12
xor eax, eax
lea r10, [rdi + 0x18]
mov byte [rsi + 0x7c], al
lea rdx, [rdi + 0x20]
mov byte [rsi + 0x71], al
lea r11, [rdi + 0x38]
mov qword [rsi + 0x18], r10
lea r8, [rdi + 0x40]
mov qword [rsi + 0x20], rdx
lea r15, [rdi + 0x58]
mov qword [rsi + 0x38], r11
lea r9, [rdi + 0x5c]
mov qword [rsi + 0x40], r8
mov qword [rdx], r12
mov qword [r8], r12
mov dword [r9], eax
mov qword [r10], r12
mov qword [r11], r12
mov dword [r15], eax
mov rdx, qword [0x1400ab330]
mov qword [rsi + 0x50], r15
mov qword [rsi + 0x58], r9
mov qword [rsi + 0x80], r12
mov qword [r8 + 0x44], rdx
mov qword [rsi + 0x68], r12
test rbx, rbx
je 0x14001c9dc
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001c9d7
vmovups xmm9, xmmword [rbp + 0x50]
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x70]
mov r12, qword [rbp + 0x88]
mov r15, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
call fcn.140081cb0
mov rdx, qword [rdi]
mov ecx, 4
movsxd rbx, dword [rdx + 4]
cmp qword [rbx + rdi + 0x48], 0
mov edx, dword [rbx + rdi + 0x10]
cmove eax, ecx
or edx, 0xffffffe2
or edx, eax
and edx, 0x17
mov esi, dword [rbx + rdi + 0x14]
mov dword [rbx + rdi + 0x10], edx
and edx, esi
je 0x14001c991
test dl, 4
je 0x14001ca17
lea r15, str.ios_base::badbit_set
jmp 0x14001ca2c
test dl, 2
lea rax, str.ios_base::failbit_set
lea r15, str.ios_base::eofbit_set
cmovne r15, rax
mov rcx, qword gs:[0x58]
mov eax, 4
movsxd rbx, dword [0x1400a9f98]
mov esi, dword [0x1400ab338]
mov rdi, qword [rcx + rbx*8]
cmp esi, dword [rdi + rax]
jg 0x14001cfb0
lea rax, [0x1400ab340]
vpxor xmm9, xmm9, xmm9
mov dword [rbp + 0x30], 1
mov qword [rbp + 0x38], rax
vmovdqu xmmword [rbp + 0xb0], xmm9
mov rdx, r15
mov qword [rbp + 0xc0], r12
mov qword [rbp + 0xc8], r12
mov rcx, rdx
and rdx, 0xfffffffffffffff0
vpxor xmm0, xmm0, xmm0
vpcmpeqb xmm0, xmm0, xmmword [rdx]
vpmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x14001caac
mov rax, rdx
add rdx, rcx
call fcn.140078bf0
mov rdi, rax
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x14001cf8c
cmp rdi, 0xf
ja 0x14001ce60
mov rdx, r15
lea rcx, [rbp + 0xb0]
mov r8, rdi
mov qword [rcx + 0x10], rdi
mov qword [rcx + 0x18], 0xf
call fcn.140078d70
mov byte [rbp + rdi + 0xb0], 0
vmovdqu xmmword [rbp + 0xd0], xmm9
cmp qword [rbp + 0xc8], 0xf
movabs rax, 0x7fffffffffffffff
mov rsi, qword [rbp + 0xc0]
lea rdi, [rbp + 0xb0]
cmova rdi, qword [rdi]
cmp rsi, rax
ja 0x14001ce2e
cmp rsi, 0xf
ja 0x14001ccf9
mov qword [rbp + 0xe0], rsi
mov qword [rbp + 0xe8], 0xf
vmovups xmm0, xmmword [rdi]
vmovups xmmword [rbp + 0xd0], xmm0
vmovups xmm0, xmmword [rbp + 0x30]
lea rdx, [rbp]
vmovups xmmword [rdx], xmm0
lea rcx, [rbp + 0x90]
lea r8, [rbp + 0xd0]
call fcn.1400616b0
lea rax, vtable.std::exception.0
mov rdx, qword [rbp + 0xa8]
mov rbx, qword [rbp + 0x90]
mov qword [rbp], rax
vmovdqu xmmword [rbp + 8], xmm9
cmp rdx, 0xf
lea rcx, [rbp + 0x40]
vmovups xmm0, xmmword [0x140088fe0]
lea rdx, [rbp + 0x90]
vmovups xmmword [rcx], xmm0
cmova rdx, rbx
mov qword [rcx], rdx
lea rdx, [rbp + 8]
call sub.VCRUNTIME140.dll___std_exception_copy
mov rbx, qword [rbp + 0xa8]
cmp rbx, 0xf
ja 0x14001cc97
vmovups xmm0, xmmword [rbp + 0x30]
mov rbx, qword [rbp + 0xc8]
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], 0xf
mov byte [rbp + 0x90], 0
vmovups xmmword [rbp + 0x18], xmm0
cmp rbx, 0xf
ja 0x14001cc39
lea rdx, [0x1400c0840]
lea rcx, [rbp]
lea rax, vtable.std::ios_base::failure.0
mov qword [rbp + 0xc0], 0
mov qword [rbp + 0xc8], 0xf
mov byte [rbp + 0xb0], 0
mov qword [rcx], rax
call sub.VCRUNTIME140.dll__CxxThrowException
jmp 0x14001c991
lea rax, vtable.std::_System_error.0
lea rdx, [rbx + 1]
mov qword [rbp], rax
mov rax, qword [rbp + 0xb0]
mov rcx, rax
cmp rdx, 0x1000
jb 0x14001cc72
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14001cc79
cmp rax, 0x27
ja 0x14001cc79
call fcn.140081d8c
jmp 0x14001cbfd
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001c9d7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
lea rax, vtable.std::runtime_error.0
lea rdx, [rbx + 1]
mov qword [rbp], rax
mov rax, qword [rbp + 0x90]
mov rcx, rax
cmp rdx, 0x1000
jb 0x14001ccd0
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14001ccda
cmp rax, 0x27
ja 0x14001ccda
call fcn.140081d8c
jmp 0x14001cbc9
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001ccf3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140081cb0
nop
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
ja 0x14001cd14
mov eax, 0x16
cmp rbx, 0x16
cmovb rbx, rax
jmp 0x14001cd1e
movabs rbx, 0x7fffffffffffffff
mov rcx, rbx
inc rcx
je 0x14001cd6a
mov qword [rbp + 0xe8], r12
mov qword [rbp + 0xe0], r12
cmp rcx, 0x1000
jb 0x14001cd62
lea rax, [rbx + 0x28]
cmp rax, rcx
jbe 0x14001cdb3
mov rcx, rax
call fcn.140081d50
test rax, rax
je 0x14001cd95
lea r12, [rax + 0x27]
and r12, 0xffffffffffffffe0
mov qword [r12 - 8], rax
jmp 0x14001cd6a
call fcn.140081d50
mov r12, rax
mov qword [rbp + 0xe0], rsi
inc rsi
mov rcx, r12
mov rdx, rdi
mov r8, rsi
mov qword [rbp + 0xd0], r12
mov qword [rbp + 0xe8], rbx
call fcn.140078d70
jmp 0x14001cb4f
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cdae
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140081cb0
lea rax, vtable.std::exception.0
mov qword [rbp], rax
vmovdqu xmmword [rbp + 8], xmm9
lea rdx, vtable.std::bad_array_new_length.0
lea rcx, [rbp]
mov qword [rcx], rdx
lea rdx, [0x1400c08a0]
lea rax, [0x140089860]
mov qword [rbp + 8], rax
call sub.VCRUNTIME140.dll__CxxThrowException
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cdae
vmovups xmm9, xmmword [rbp + 0x50]
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x70]
mov r12, qword [rbp + 0x88]
mov r15, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
mov qword [rbp + 0xe8], r12
mov qword [rbp + 0xe0], r12
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cdae
lea rcx, str.string_too_long
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
nop
mov rsi, rdi
or rsi, 0xf
cmp rsi, rax
ja 0x14001ce7b
mov eax, 0x16
cmp rsi, 0x16
cmovb rsi, rax
jmp 0x14001ce85
movabs rsi, 0x7fffffffffffffff
mov rcx, rsi
inc rcx
je 0x14001cec4
cmp rcx, 0x1000
jb 0x14001ceba
lea rax, [rsi + 0x28]
cmp rax, rcx
jbe 0x14001cf11
mov rcx, rax
call fcn.140081d50
test rax, rax
je 0x14001cef3
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14001cec7
call fcn.140081d50
mov rbx, rax
jmp 0x14001cec7
mov rbx, r12
mov rcx, rbx
mov rdx, r15
mov r8, rdi
mov qword [rbp + 0xb0], rbx
mov qword [rbp + 0xc0], rdi
mov qword [rbp + 0xc8], rsi
call fcn.140078d70
mov byte [rbx + rdi], 0
jmp 0x14001caf2
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cf0c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140081cb0
lea rax, vtable.std::exception.0
mov qword [rbp], rax
vmovdqu xmmword [rbp + 8], xmm9
lea rdx, vtable.std::bad_array_new_length.0
lea rcx, [rbp]
mov qword [rcx], rdx
lea rdx, [0x1400c08a0]
lea rax, [0x140089860]
mov qword [rbp + 8], rax
call sub.VCRUNTIME140.dll__CxxThrowException
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cf0c
vmovups xmm9, xmmword [rbp + 0x50]
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x70]
mov r12, qword [rbp + 0x88]
mov r15, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a3fc0]
jne 0x14001cf0c
lea rcx, str.string_too_long
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
nop
lea rcx, [0x1400ab338]
call fcn.140081e00
cmp dword [0x1400ab338], 0xffffffff
jne 0x14001ca54
vmovups xmm0, xmmword [0x140088ff0]
lea rcx, [0x140020260]
vmovups xmmword [0x1400ab340], xmm0
call fcn.1400820a0
lea rcx, [0x1400ab338]
call fcn.140081d94
jmp 0x14001ca54
mov rax, qword [rsi + 0x88]
mov rbx, qword [rsi + 0x90]
mov qword [rdx], rax
sub rbx, rax
mov rdx, qword [rsi + 0x38]
mov qword [rdx], rax
mov r8, qword [rsi + 0x50]
mov dword [r8], ebx
jmp 0x14001c864