Function at 0x14004ce90
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 + 8]
mov qword [rbp + 0x80], rbx
mov rax, qword [0x1400b7ba8]
xor rax, rbp
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x60], 0xfffffffffffffffe
cmp qword [rsi + 0x80], 0
jne 0x14004cef0
xor ebx, ebx
xor r12d, r12d
jmp 0x14004cfc2
mov rdx, qword [rsi + 0x18]
lea rax, [rdi + 0x78]
cmp rax, qword [rdx]
je 0x14004d6c6
mov rbx, rsi
cmp qword [rsi + 0x68], 0
je 0x14004cf11
cmp byte [rsi + 0x71], 0
jne 0x14004cf19
xor r12d, r12d
jmp 0x14004cfaf
mov rax, qword [rsi]
mov rcx, rsi
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14004cfaa
mov rcx, qword [rsi + 0x68]
mov r10, rsp
lea rdx, [rdi + 0x7c]
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 0x14004cf6b
cmp eax, 1
je 0x14004cf6f
cmp eax, 3
jne 0x14004cfaa
mov byte [rsi + 0x71], 0
xor r12d, r12d
jmp 0x14004cfaf
mov byte [rsi + 0x71], 0
mov r12, qword [rbp + 0x28]
lea rax, [rbp + 0xf0]
sub r12, rax
je 0x14004cfa0
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 0x14004cfaa
cmp byte [rsi + 0x71], 0
je 0x14004cf11
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 + 0x10]
mov byte [rsi + 0x7c], al
lea rdx, [rdi + 0x18]
mov byte [rsi + 0x71], al
lea r11, [rdi + 0x30]
mov qword [rsi + 0x18], r10
lea r8, [rdi + 0x38]
mov qword [rsi + 0x20], rdx
lea r14, [rdi + 0x50]
mov qword [rsi + 0x38], r11
lea r9, [rdi + 0x54]
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 [0x1400c4520]
mov qword [rsi + 0x50], r14
mov qword [rsi + 0x58], r9
mov qword [rsi + 0x80], r12
mov qword [rdi + 0x7c], rdx
mov qword [rsi + 0x68], r12
test rbx, rbx
je 0x14004d072
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400b7ba8]
jne 0x14004d06d
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.1400965d0
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 0x14004d027
test dl, 4
je 0x14004d0ad
lea r14, str.ios_base::badbit_set
jmp 0x14004d0c2
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 [0x1400c3188]
mov esi, dword [0x1400c4530]
mov rdi, qword [rcx + rbx*8]
cmp esi, dword [rdi + rax]
jg 0x14004d680
lea rax, [0x1400c4540]
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 0x14004d142
mov rax, rdx
add rdx, rcx
call fcn.140090340
mov rdi, rax
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x14004d65c
cmp rdi, 0x10
jae 0x14004d518
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 0x14004d4e6
cmp rsi, 0x10
jae 0x14004d38c
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.140043330
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 [0x1400a69e0]
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 0x14004d32a
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 0x14004d2cc
lea rdx, [0x1400dfd60]
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 0x14004d027
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 0x14004d305
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14004d30c
cmp rax, 0x27
ja 0x14004d30c
call fcn.1400965f0
jmp 0x14004d290
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b7ba8]
jne 0x14004d06d
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 0x14004d363
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14004d36d
cmp rax, 0x27
ja 0x14004d36d
call fcn.1400965f0
jmp 0x14004d25c
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b7ba8]
jne 0x14004d386
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.1400965d0
nop
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
ja 0x14004d3a7
mov eax, 0x16
cmp rbx, 0x16
cmovb rbx, rax
jmp 0x14004d3b1
movabs rbx, 0x7fffffffffffffff
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jae 0x14004d40f
cmp rbx, 0xffffffffffffffff
jne 0x14004d3ef
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.140090750
jmp 0x14004d1e2
mov qword [rbp + 0xc8], 0xf
mov qword [rbp + 0xc0], 0
call fcn.140096b30
mov r12, rax
jmp 0x14004d3c4
mov qword [rbp + 0xc8], 0xf
lea rax, [rbx + 0x28]
mov qword [rbp + 0xc0], 0
cmp rax, rcx
jbe 0x14004d46b
mov rcx, rax
call fcn.140096b30
test rax, rax
je 0x14004d44d
lea r12, [rax + 0x27]
and r12, 0xffffffffffffffe0
mov qword [r12 - 8], rax
jmp 0x14004d3c4
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b7ba8]
jne 0x14004d466
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.1400965d0
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, [0x1400dfdc0]
lea rax, [0x1400a18bc]
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 [0x1400b7ba8]
jne 0x14004d466
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 [0x1400b7ba8]
jne 0x14004d466
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 0x14004d533
mov eax, 0x16
cmp rsi, 0x16
cmovb rsi, rax
jmp 0x14004d53d
movabs rsi, 0x7fffffffffffffff
lea rcx, [rsi + 1]
cmp rcx, 0x1000
jae 0x14004d594
cmp rsi, 0xffffffffffffffff
jne 0x14004d57f
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.140090750
mov byte [rbx + rdi], 0
jmp 0x14004d181
mov qword [rbp + 0xa8], 0xf
call fcn.140096b30
mov rbx, rax
jmp 0x14004d553
mov qword [rbp + 0xa8], 0xf
lea rax, [rsi + 0x28]
cmp rax, rcx
jbe 0x14004d5e1
mov rcx, rax
call fcn.140096b30
test rax, rax
je 0x14004d5c3
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14004d553
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b7ba8]
jne 0x14004d5dc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.1400965d0
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, [0x1400dfdc0]
lea rax, [0x1400a18bc]
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 [0x1400b7ba8]
jne 0x14004d5dc
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 [0x1400b7ba8]
jne 0x14004d5dc
lea rcx, str.string_too_long
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
nop
lea rcx, [0x1400c4530]
call fcn.1400967d0
cmp dword [0x1400c4530], 0xffffffff
jne 0x14004d0ea
vmovups xmm0, xmmword [0x1400a69f0]
lea rcx, [0x140004d90]
vmovups xmmword [0x1400c4540], xmm0
call fcn.140096b18
lea rcx, [0x1400c4530]
call fcn.140096770
jmp 0x14004d0ea
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 0x14004cf01