Function at 0x140002380
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
mov rbp, rsp
sub rsp, 0x58
cmp qword [rcx + 0x68], 0
mov rdi, rcx
je 0x1400025d4
cmp byte [rcx + 0x71], 0
je 0x1400025d4
mov rax, qword [rcx]
or edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
jne 0x1400023b9
xor al, al
add rsp, 0x58
pop rdi
pop rbp
ret
xor ecx, ecx
mov qword [rsp + 0x80], rsi
mov edx, 0xf
mov byte [rbp - 0x28], 0
cmp rdx, 0x10
mov qword [rsp + 0x50], r14
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rdx
cmovae rax, rcx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], 8
xor r14d, r14d
mov qword [rsp + 0x78], rbx
mov byte [rax + 8], cl
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
cmp r9, 0x10
lea rax, [rbp + 0x18]
mov r9, qword [rbp - 0x18]
lea rdx, [rbp - 0x28]
cmovae rdx, rcx
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x28]
cmovae r8, rcx
mov rcx, qword [rdi + 0x68]
add r9, rdx
lea rdx, [rdi + 0x74]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002453
sub eax, 1
je 0x140002457
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
sub eax, 2
je 0x140002562
xor bl, bl
jmp 0x140002564
mov byte [rdi + 0x71], r14b
mov r9, qword [rbp - 0x10]
lea rax, [rbp - 0x28]
mov rcx, qword [rbp - 0x28]
cmp r9, 0x10
mov rbx, qword [rbp + 0x18]
cmovae rax, rcx
sub rbx, rax
je 0x1400024a5
cmp r9, 0x10
lea rax, [rbp - 0x28]
mov r9, qword [rdi + 0x80]
mov r8, rbx
cmovae rax, rcx
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
cmp rbx, rax
jne 0x14000244c
cmp byte [rdi + 0x71], r14b
je 0x140002562
test rbx, rbx
jne 0x140002400
mov r8, qword [rbp - 0x18]
or rax, 0xffffffffffffffff
sub rax, r8
cmp rax, 8
jbe 0x140002554
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140002546
cmp r9, rbx
jae 0x140002529
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.1400021f0
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
test rbx, rbx
je 0x140002400
mov rax, qword [rbp - 0x18]
lea rdx, [rbp - 0x28]
cmp r9, 0x10
cmovae rdx, rcx
xor ecx, ecx
mov qword [rdx + rax], rcx
lea rax, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
mov qword [rbp - 0x18], rbx
cmovae rax, qword [rbp - 0x28]
mov byte [rax + rbx], cl
jmp 0x1400023f8
test rbx, rbx
jne 0x1400024f9
cmp r9, 0x10
mov qword [rbp - 0x18], r14
lea rax, [rbp - 0x28]
cmovae rax, rcx
mov byte [rax], r14b
jmp 0x1400023f8
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov bl, 1
cmp r9, 0x10
jb 0x1400025b8
lea rax, [r9 + 1]
cmp rax, 0x1000
jb 0x1400025b3
test byte [rbp - 0x28], 0x1f
je 0x140002583
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140002593
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x1400025a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x1400025b0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rax
call fcn.1400139a0
mov rsi, qword [rsp + 0x80]
movzx eax, bl
mov rbx, qword [rsp + 0x78]
mov r14, qword [rsp + 0x50]
add rsp, 0x58
pop rdi
pop rbp
ret
mov al, 1
add rsp, 0x58
pop rdi
pop rbp
ret