Function at 0x14004dc10
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 + 8]
mov qword [rbp + 0x80], rbx
mov rax, qword [0x1400b8bc0]
xor rax, rbp
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x60], 0xfffffffffffffffe
cmp qword [rsi + 0x80], 0
jne 0x14004dc70
xor ebx, ebx
xor r12d, r12d
jmp 0x14004dd42
mov rdx, qword [rsi + 0x18]
lea rax, [rdi + 0x78]
cmp rax, qword [rdx]
je 0x14004e40c
mov rbx, rsi
cmp qword [rsi + 0x68], 0
je 0x14004dc91
cmp byte [rsi + 0x71], 0
jne 0x14004dc99
xor r12d, r12d
jmp 0x14004dd2f
mov rax, qword [rsi]
mov rcx, rsi
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14004dd2a
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 0x14004dceb
cmp eax, 1
je 0x14004dcef
cmp eax, 3
jne 0x14004dd2a
mov byte [rsi + 0x71], 0
xor r12d, r12d
jmp 0x14004dd2f
mov byte [rsi + 0x71], 0
mov r12, qword [rbp + 0x28]
lea rax, [rbp + 0xf0]
sub r12, rax
je 0x14004dd20
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 0x14004dd2a
cmp byte [rsi + 0x71], 0
je 0x14004dc91
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 r15, [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 [r15], eax
mov rdx, qword [0x1400c5500]
mov qword [rsi + 0x50], r15
mov qword [rsi + 0x58], r9
mov qword [rsi + 0x80], r12
mov qword [rdi + 0x7c], rdx
mov qword [rsi + 0x68], r12
test rbx, rbx
je 0x14004ddf2
mov rcx, qword [rbp + 0x110]
mov qword [rbp + 0x110], 0
xor rcx, rbp
cmp rcx, qword [0x1400b8bc0]
jne 0x14004dded
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.140097240
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 0x14004dda7
test dl, 4
je 0x14004de2d
lea r15, str.ios_base::badbit_set
jmp 0x14004de42
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 [0x1400c4170]
mov esi, dword [0x1400c5510]
mov rdi, qword [rcx + rbx*8]
cmp esi, dword [rdi + rax]
jg 0x14004e3c6
lea rax, [0x1400c5520]
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 0x14004dec2
mov rax, rdx
add rdx, rcx
call fcn.140090fe0
mov rdi, rax
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x14004e3a2
cmp rdi, 0xf
ja 0x14004e276
mov rdx, r15
lea rcx, [rbp + 0xb0]
mov r8, rdi
mov qword [rcx + 0x10], rdi
mov qword [rcx + 0x18], 0xf
call fcn.1400913f0
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 0x14004e244
cmp rsi, 0xf
ja 0x14004e10f
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.1400432c0
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 [0x1400a7990]
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 0x14004e0ad
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 0x14004e04f
lea rdx, [0x1400e1d60]
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 0x14004dda7
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 0x14004e088
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14004e08f
cmp rax, 0x27
ja 0x14004e08f
call fcn.140097260
jmp 0x14004e013
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b8bc0]
jne 0x14004dded
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 0x14004e0e6
lea rdx, [rbx + 0x28]
mov rcx, qword [rax - 8]
sub rax, rcx
cmp rax, 8
jb 0x14004e0f0
cmp rax, 0x27
ja 0x14004e0f0
call fcn.140097260
jmp 0x14004dfdf
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b8bc0]
jne 0x14004e109
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140097240
nop
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
ja 0x14004e12a
mov eax, 0x16
cmp rbx, 0x16
cmovb rbx, rax
jmp 0x14004e134
movabs rbx, 0x7fffffffffffffff
mov rcx, rbx
inc rcx
je 0x14004e180
mov qword [rbp + 0xe8], r12
mov qword [rbp + 0xe0], r12
cmp rcx, 0x1000
jb 0x14004e178
lea rax, [rbx + 0x28]
cmp rax, rcx
jbe 0x14004e1c9
mov rcx, rax
call fcn.14009760c
test rax, rax
je 0x14004e1ab
lea r12, [rax + 0x27]
and r12, 0xffffffffffffffe0
mov qword [r12 - 8], rax
jmp 0x14004e180
call fcn.14009760c
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.1400913f0
jmp 0x14004df65
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b8bc0]
jne 0x14004e1c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140097240
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, [0x1400e1dc0]
lea rax, [0x1400a287c]
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 [0x1400b8bc0]
jne 0x14004e1c4
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 [0x1400b8bc0]
jne 0x14004e1c4
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 0x14004e291
mov eax, 0x16
cmp rsi, 0x16
cmovb rsi, rax
jmp 0x14004e29b
movabs rsi, 0x7fffffffffffffff
mov rcx, rsi
inc rcx
je 0x14004e2da
cmp rcx, 0x1000
jb 0x14004e2d0
lea rax, [rsi + 0x28]
cmp rax, rcx
jbe 0x14004e327
mov rcx, rax
call fcn.14009760c
test rax, rax
je 0x14004e309
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14004e2dd
call fcn.14009760c
mov rbx, rax
jmp 0x14004e2dd
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.1400913f0
mov byte [rbx + rdi], 0
jmp 0x14004df08
mov rcx, qword [rbp + 0x110]
xor rcx, rbp
cmp rcx, qword [0x1400b8bc0]
jne 0x14004e322
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140097240
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, [0x1400e1dc0]
lea rax, [0x1400a287c]
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 [0x1400b8bc0]
jne 0x14004e322
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 [0x1400b8bc0]
jne 0x14004e322
lea rcx, str.string_too_long
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
nop
lea rcx, [0x1400c5510]
call fcn.140097354
cmp dword [0x1400c5510], 0xffffffff
jne 0x14004de6a
vmovups xmm0, xmmword [0x1400a79a0]
lea rcx, [0x140004d90]
vmovups xmmword [0x1400c5520], xmm0
call fcn.1400975f4
lea rcx, [0x1400c5510]
call fcn.1400972e8
jmp 0x14004de6a
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 0x14004dc81