Function at 0x140020d80
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1401e7270]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, rcx
cmp qword [rcx + 0x68], 0
je 0x140020fee
cmp byte [rcx + 0x71], 0
je 0x140020fee
mov rax, qword [rcx]
or edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
jne 0x140020dde
xor al, al
jmp 0x140020ff0
mov edx, select
mov qword [rbp - 0x18], rdx
mov byte [rbp - 0x30], 0
xor ecx, ecx
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x20], 8
lea rax, [rbp - 0x30]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
lea r15, vtable.std::codecvt_char__char__struct__Mbstatet_.0
xor r14d, r14d
mov r8, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x30]
nop word [rax + rax]
lea rcx, [rbp - 0x30]
cmp r8, 0x10
cmovae rcx, rdx
lea rbx, [rbp - 0x30]
cmovae rbx, rdx
mov r10, qword [rdi + 0x68]
mov r9, qword [rbp - 0x20]
add r9, rcx
mov rax, qword [r10]
mov r11, qword [rax + 0x40]
cmp rax, r15
jne 0x140020e54
mov qword [rbp - 0x40], rbx
mov eax, r14d
jmp 0x140020e76
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rdi + 0x74]
mov rcx, r10
call r11
mov r8, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x30]
mov rbx, qword [rbp - 0x40]
test eax, eax
je 0x140020e85
sub eax, 1
jne 0x140020f71
jmp 0x140020e89
mov byte [rdi + 0x71], r14b
lea rax, [rbp - 0x30]
cmp r8, 0x10
cmovae rax, rdx
sub rbx, rax
je 0x140020ecb
lea rcx, [rbp - 0x30]
cmp r8, 0x10
cmovae rcx, rdx
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
call fcn.1400fde58
mov r8, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x30]
cmp rbx, rax
jne 0x140020f76
cmp byte [rdi + 0x71], r14b
je 0x140020f94
test rbx, rbx
jne 0x140020e20
or rax, 0xffffffffffffffff
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 8
jbe 0x140020f87
lea rbx, [rcx + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140020f7a
cmp r8, rbx
jae 0x140020f1b
mov r8, rcx
mov rdx, rbx
lea rcx, [rbp - 0x30]
call fcn.140005590
mov r8, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x30]
jmp 0x140020f38
test rbx, rbx
jne 0x140020f41
mov qword [rbp - 0x20], r14
lea rax, [rbp - 0x30]
cmp r8, 0x10
cmovae rax, rdx
mov byte [rax], r14b
jmp 0x140020e12
test rbx, rbx
je 0x140020e20
lea rcx, [rbp - 0x30]
cmp r8, 0x10
cmovae rcx, rdx
mov rax, qword [rbp - 0x20]
xor edx, edx
mov qword [rax + rcx], rdx
mov qword [rbp - 0x20], rbx
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 0x10
cmovae rax, qword [rbp - 0x30]
mov byte [rbx + rax], dl
jmp 0x140020e12
sub eax, 2
je 0x140020f94
xor bl, bl
jmp 0x140020f96
lea rcx, str.string_too_long
call fcn.1400d1e04
int3
lea rcx, str.string_too_long
call fcn.1400d1e04
int3
mov bl, 1
cmp r8, 0x10
jb 0x140020fe9
lea rax, [r8 + 1]
cmp rax, 0x1000
jb 0x140020fe1
test byte [rbp - 0x30], 0x1f
je 0x140020fb4
call fcn.1400f7f64
int3
mov rax, qword [rdx - 8]
cmp rax, rdx
jb 0x140020fc3
call fcn.1400f7f64
int3
sub rdx, rax
cmp rdx, 8
jae 0x140020fd2
call fcn.1400f7f64
int3
cmp rdx, 0x27
jbe 0x140020fde
call fcn.1400f7f64
int3
mov rdx, rax
mov rcx, rdx
call fcn.1400cd710
movzx eax, bl
jmp 0x140020ff0
mov al, 1
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400d5050
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret