Function at 0x14001cdc0
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], r14
mov qword [rbp + 0x88], r12
mov qword [rbp + 0x78], rsi
lea rsi, [rdi + 0x10]
mov qword [rbp + 0x80], rbx
mov rax, qword [0x1400a2fa8]
xor rax, rbp
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x60], 0xfffffffffffffffe
cmp qword [rsi + 0x80], 0
jne 0x14001ce20
xor ebx, ebx
xor r12d, r12d
jmp 0x14001cefc
mov rdx, qword [rsi + 0x18]
lea rax, [rdi + 0x80]
cmp rax, qword [rdx]
je 0x14001d600
mov rbx, rsi
cmp qword [rsi + 0x68], 0
je 0x14001ce44
cmp byte [rsi + 0x71], 0
jne 0x14001ce4c
xor r12d, r12d
jmp 0x14001cee9
mov rax, qword [rsi]
mov rcx, rsi
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14001cee4
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 0x14001cea5
cmp eax, 1
je 0x14001cea9
cmp eax, 3
jne 0x14001cee4
mov byte [rsi + 0x71], 0
xor r12d, r12d
jmp 0x14001cee9
mov byte [rsi + 0x71], 0
mov r12, qword [rbp + 0x28]
lea rax, [rbp + 0xf0]
sub r12, rax
je 0x14001ceda
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 0x14001cee4
cmp byte [rsi + 0x71], 0
je 0x14001ce44
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 r14, [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 [r14], eax
mov rdx, qword [0x1400aa330]
mov qword [rsi + 0x50], r14
mov qword [rsi + 0x58], r9
mov qword [rsi + 0x80], r12
mov qword [r8 + 0x44], rdx
mov qword [rsi + 0x68], r12
test rbx, rbx
je 0x14001cfac
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001cfa7
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 r14, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
call fcn.140080e70
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 0x14001cf61
test dl, 4
je 0x14001cfe7
lea r14, str.ios_base::badbit_set
jmp 0x14001cffc
test dl, 2
lea rax, str.ios_base::failbit_set
lea r14, str.ios_base::eofbit_set
cmovne r14, rax
mov rcx, qword gs:[0x58]
mov eax, 4
movsxd rbx, dword [0x1400a8f90]
mov esi, dword [0x1400aa338]
mov rdi, qword [rcx + rbx*8]
cmp esi, dword [rdi + rax]
jg 0x14001d5ba
lea rax, [0x1400aa340]
vpxor xmm9, xmm9, xmm9
mov dword [rbp + 0x30], 1
mov qword [rbp + 0x38], rax
vmovdqu xmmword [rbp + 0x90], xmm9
mov rdx, r14
mov qword [rbp + 0xa0], r12
mov qword [rbp + 0xa8], 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 0x14001d07c
mov rax, rdx
add rdx, rcx
call fcn.140078110
mov rdi, rax
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x14001d596
cmp rdi, 0x10
jae 0x14001d452
mov rdx, r14
lea rcx, [rbp + 0x90]
mov r8, rdi
mov qword [rcx + 0x10], rdi
mov qword [rcx + 0x18], 0xf
call sub.VCRUNTIME140.dll_memmove
nop
vmovdqu xmmword [rbp + 0xb0], xmm9
cmp qword [rbp + 0xa8], 0x10
movabs rax, 0x7fffffffffffffff
mov rsi, qword [rbp + 0xa0]
lea rdi, [rbp + 0x90]
cmovae rdi, qword [rdi]
cmp rsi, rax
ja 0x14001d420
cmp rsi, 0x10
jae 0x14001d2c6
mov rdx, rdi
lea rcx, [rbp + 0xb0]
mov r8d, 0x10
mov qword [rcx + 0x10], rsi
mov qword [rcx + 0x18], 0xf
call sub.VCRUNTIME140.dll_memmove
nop
vmovups xmm0, xmmword [rbp + 0x30]
lea rdx, [rbp]
vmovups xmmword [rdx], xmm0
lea rcx, [rbp + 0xd0]
lea r8, [rbp + 0xb0]
call fcn.140061d50
lea rax, vtable.std::exception.0
mov rdx, qword [rbp + 0xe8]
mov rbx, qword [rbp + 0xd0]
mov qword [rbp], rax
vmovdqu xmmword [rbp + 8], xmm9
cmp rdx, 0x10
lea rcx, [rbp + 0x40]
vmovups xmm0, xmmword [0x140088020]
lea rdx, [rbp + 0xd0]
vmovups xmmword [rcx], xmm0
cmovae rdx, rbx
mov qword [rcx], rdx
lea rdx, [rbp + 8]
call sub.VCRUNTIME140.dll___std_exception_copy
mov rbx, qword [rbp + 0xe8]
cmp rbx, 0x10
jae 0x14001d264
vmovups xmm0, xmmword [rbp + 0x30]
mov rbx, qword [rbp + 0xa8]
mov qword [rbp + 0xe0], 0
mov qword [rbp + 0xe8], 0xf
mov byte [rbp + 0xd0], 0
vmovups xmmword [rbp + 0x18], xmm0
cmp rbx, 0x10
jae 0x14001d206
lea rdx, [0x1400bf850]
lea rcx, [rbp]
lea rax, vtable.std::ios_base::failure.0
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], 0xf
mov byte [rbp + 0x90], 0
mov qword [rcx], rax
call sub.VCRUNTIME140.dll__CxxThrowException
jmp 0x14001cf61
lea rax, vtable.std::_System_error.0
lea rdx, [rbx + 1]
mov qword [rbp], rax
mov rax, qword [rbp + 0x90]
mov rcx, rax
cmp rdx, 0x1000
jb 0x14001d23f
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14001d246
cmp rax, 0x27
ja 0x14001d246
call fcn.140080f10
jmp 0x14001d1ca
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001cfa7
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 + 0xd0]
mov rcx, rax
cmp rdx, 0x1000
jb 0x14001d29d
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14001d2a7
cmp rax, 0x27
ja 0x14001d2a7
call fcn.140080f10
jmp 0x14001d196
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001d2c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140080e70
nop
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
ja 0x14001d2e1
mov eax, 0x16
cmp rbx, 0x16
cmovb rbx, rax
jmp 0x14001d2eb
movabs rbx, 0x7fffffffffffffff
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jae 0x14001d349
cmp rbx, 0xffffffffffffffff
jne 0x14001d329
mov qword [rbp + 0xc0], rsi
inc rsi
mov rcx, r12
mov rdx, rdi
mov r8, rsi
mov qword [rbp + 0xb0], r12
mov qword [rbp + 0xc8], rbx
call fcn.140078290
jmp 0x14001d11c
mov qword [rbp + 0xc8], 0xf
mov qword [rbp + 0xc0], 0
call fcn.140080f18
mov r12, rax
jmp 0x14001d2fe
mov qword [rbp + 0xc8], 0xf
lea rax, [rbx + 0x28]
mov qword [rbp + 0xc0], 0
cmp rax, rcx
jbe 0x14001d3a5
mov rcx, rax
call fcn.140080f18
test rax, rax
je 0x14001d387
lea r12, [rax + 0x27]
and r12, 0xffffffffffffffe0
mov qword [r12 - 8], rax
jmp 0x14001d2fe
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001d3a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140080e70
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, [0x1400bf8b0]
lea rax, [0x1400888a0]
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 [0x1400a2fa8]
jne 0x14001d3a0
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 r14, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
mov qword [rbp + 0xc8], r12
mov qword [rbp + 0xc0], r12
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001d3a0
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 0x14001d46d
mov eax, 0x16
cmp rsi, 0x16
cmovb rsi, rax
jmp 0x14001d477
movabs rsi, 0x7fffffffffffffff
lea rcx, [rsi + 1]
cmp rcx, 0x1000
jae 0x14001d4ce
cmp rsi, 0xffffffffffffffff
jne 0x14001d4b9
mov rbx, r12
mov rcx, rbx
mov rdx, r14
mov r8, rdi
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0xa0], rdi
mov qword [rbp + 0xa8], rsi
call fcn.140078290
mov byte [rbx + rdi], 0
jmp 0x14001d0bb
mov qword [rbp + 0xa8], 0xf
call fcn.140080f18
mov rbx, rax
jmp 0x14001d48d
mov qword [rbp + 0xa8], 0xf
lea rax, [rsi + 0x28]
cmp rax, rcx
jbe 0x14001d51b
mov rcx, rax
call fcn.140080f18
test rax, rax
je 0x14001d4fd
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14001d48d
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001d516
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140080e70
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, [0x1400bf8b0]
lea rax, [0x1400888a0]
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 [0x1400a2fa8]
jne 0x14001d516
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 r14, qword [rbp + 0x68]
lea rsp, [rbp + 0x120]
pop rbp
ret
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400a2fa8]
jne 0x14001d516
lea rcx, str.string_too_long
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
nop
lea rcx, [0x1400aa338]
call fcn.1400810ac
cmp dword [0x1400aa338], 0xffffffff
jne 0x14001d024
vmovups xmm0, xmmword [0x140088030]
lea rcx, [0x1400208e0]
vmovups xmmword [0x1400aa340], xmm0
call fcn.1400813f4
lea rcx, [0x1400aa338]
call fcn.14008104c
jmp 0x14001d024
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 0x14001ce34